Assertion.equal

Asserts for equality between two objects. Returns the value wrapped around the assertion.

struct Assertion(T)
@trusted
T
equal
(
U
)
(
auto ref U other
,
string file = __FILE__
,
size_t line = __LINE__
)

Examples

[1, 2, 3, 4].should.equal([1, 2, 3, 4]);
255.should.equal(10); // Throws an Exception "expected 255 to equal 10"

Meta