assertEquals

Common mispelling.

  1. alias assertEquals = assertEqual
    alias assertEquals = assertEqual
  2. alias assertNotEqual = assertEquality!false

Examples

1 assertEqual(1, 1);
2 assertNotEqual(1, 2);
3 
4 assert(assertEqual("foo", "bar").getExceptionMsg == `("foo" == "bar") failed.`);
5 assert(assertNotEqual(1, 1).getExceptionMsg == "(1 != 1) failed.");
6 
7 int x;
8 int[] y;
9 static assert(!__traits(compiles, x.assertEqual(y)));

Meta