- You use needn't have when you did something and afterwards it turned out it was not necessary
- after needn't have> past participle
I needn't have worried about my test results. I passed with flying colours.
(judging from this the person speaking did in fact worry, but it was not necessary)