You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/fluentasserts/operations/equality/equal.d
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -709,6 +709,7 @@ unittest {
709
709
assert(evaluation.result.negated ==true, "expected negated to be true");
710
710
}
711
711
712
+
// Issue #98: opEquals should be honored when asserting equality
712
713
@("objects with custom opEquals compares two exact values")
713
714
unittest {
714
715
auto testValue = new EqualThing(1);
@@ -720,6 +721,7 @@ unittest {
720
721
assert(evaluation.result.expected.length ==0, "equal operation should pass for same object reference");
721
722
}
722
723
724
+
// Issue #98: opEquals should be honored when asserting equality
723
725
@("objects with custom opEquals compares two objects with same fields")
724
726
unittest {
725
727
auto testValue = new EqualThing(1);
@@ -732,6 +734,7 @@ unittest {
732
734
assert(evaluation.result.expected.length ==0, "equal operation should pass for objects with same fields");
733
735
}
734
736
737
+
// Issue #98: opEquals should be honored when asserting equality
735
738
@("objects with custom opEquals compares object cast to Object with same fields")
736
739
unittest {
737
740
auto testValue = new EqualThing(1);
@@ -744,6 +747,7 @@ unittest {
744
747
assert(evaluation.result.expected.length ==0, "equal operation should pass for objects with same fields cast to Object");
745
748
}
746
749
750
+
// Issue #98: opEquals should be honored when asserting equality
747
751
@("objects with custom opEquals checks if two values are not equal")
748
752
unittest {
749
753
auto testValue = new EqualThing(1);
@@ -987,6 +991,7 @@ class Thing {
987
991
}
988
992
}
989
993
994
+
// Issue #98: opEquals should be honored when asserting equality
990
995
@("opEquals honored for class objects with same field value")
991
996
unittest {
992
997
auto a1 = new Thing(1);
@@ -1001,6 +1006,7 @@ unittest {
1001
1006
assert(evaluation.result.expected.length ==0, "opEquals should return true for objects with same x value, but got expected: "~ evaluation.result.expected[]);
1002
1007
}
1003
1008
1009
+
// Issue #98: opEquals should be honored when asserting equality
1004
1010
@("opEquals honored for class objects with different field values")
0 commit comments