haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Expect.equal on records #276

Closed davidtme closed 5 years ago

davidtme commented 5 years ago

I use the Expect.equal to test if records are the same but on records with quite a few fields the message from equal isn’t always helpful as it can be quite long and difficult to see where the mismatch is.

Could the message be altered to include a bit of help? Maybe just passing the 2 records through a sprintf “%A” and using the same logic as this diffString could be a big help.

MNie commented 5 years ago

@davidtme @haf Does it look good for you guys? image

davidtme commented 5 years ago

wow, thanks @MNie when I get to a point I can stop and update I'll have a play with this :)