AssertException otherwise
1 int[] expected = [0, 1]; 2 3 assertRangeEquals(expected, [0, 1]); 4 5 AssertException exception; 6 7 exception = expectThrows!AssertException(assertRangeEquals(expected, [0])); 8 assertEquals("length mismatch at index 1; expected: <1> but was: empty", exception.msg); 9 exception = expectThrows!AssertException(assertRangeEquals(expected, [0, 1, 2])); 10 assertEquals("length mismatch at index 2; expected: empty but was: <2>", exception.msg); 11 exception = expectThrows!AssertException(assertArrayEquals("bar", "baz")); 12 assertEquals("mismatch at index 2; expected: <r> but was: <z>", exception.msg);
Asserts that the ranges are equal.