shouldEqual

Verify that two values are the same.

void
shouldEqual
(
V
E
)
(
auto ref V value
,
auto ref E expected
,
string file = __FILE__
,
size_t line = __LINE__
)

Throws

UnitTestException on failure

Examples

shouldEqual(true, true);
shouldEqual(false, false);
shouldEqual(1, 1) ;
shouldEqual("foo", "foo") ;
shouldEqual([2, 3], [2, 3]) ;

shouldEqual(iota(3), [0, 1, 2]);
shouldEqual([[0, 1], [0, 1, 2]], [[0, 1], [0, 1, 2]]);
shouldEqual([[0, 1], [0, 1, 2]], [iota(2), iota(3)]);
shouldEqual([iota(2), iota(3)], [[0, 1], [0, 1, 2]]);

Meta