assertNotSame

Asserts that the values are not the same.

void
assertNotSame
(
T
U
)
(
,,
lazy string msg = null
,
string file = __FILE__
,
size_t line = __LINE__
)

Throws

AssertException otherwise

Examples

1 Object foo = new Object();
2 Object bar = new Object();
3 
4 assertNotSame(foo, bar);
5 
6 auto exception = expectThrows!AssertException(assertNotSame(foo, foo));
7 
8 assertEquals("expected not same", exception.msg);

Meta