Skip to content

Commit 85d7e18

Browse files
committed
Improve Asserts
1 parent 132ea98 commit 85d7e18

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Source/Assert.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ public static class Assert
1313
public static void Pass() => throw new SuccessException();
1414
public static void Fail() => throw new Exception();
1515

16-
// TODO: use Equals instead of ==
17-
public static void AreEqual(object a, object b) { if (a != b) throw new Exception(); }
18-
public static void AreNotEqual(object a, object b) { if (a == b) throw new Exception(); }
16+
public static void AreEqual(object a, object b) { if (!Equals(a, b)) throw new Exception(); }
17+
public static void AreNotEqual(object a, object b) { if (Equals(a, b)) throw new Exception(); }
1918

2019
public static void True(bool a) { if (!a) throw new Exception(); }
2120
public static void False(bool a) { if (a) throw new Exception(); }

0 commit comments

Comments
 (0)