assertNotSame

Asserts that the values are not the same.

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

Throws

AssertException otherwise

Examples

Object foo = new Object();
Object bar = new Object();

assertNotSame(foo, bar);

auto exception = expectThrows!AssertException(assertNotSame(foo, foo));

assertEquals("expected not same", exception.msg);

Meta