Closed AntonMeep closed 7 years ago
[new C()].should.equal([new C()]);
Will not be equal in your case because they are not equal. I think that in order to get this to work you need to override some operators like opEquals
and maybe toString
.
Anyway I fixed the compiler errors and it should work with the next release.
Thanks, for the issue!
Test case:
Fails with:
Same for classes:
Which fails with:
I tested it with:
Also, looks like it happens only if struct/class is defined inside
unittest
block. I discovered this issue when worked on my code, but in my code struct is defined outsideunittest
block and it still fails. So, I am not sure that this is fluent-asserts' bug, probably this is the bug in compiler.UPD: So, it isn't a bug in the compiler