Didn't have to or needn't have pp


The following sentence is from a school book:

"We didn't have a test today so I .............for it last night!"

A- didn't have to revise

B- needn't have revised 

The guide of answers says "B"

But I inquire why not "A".

I think that "A"  is OK as it means that we didn't revise last night because we didn't have a test today.

Original Post