5.should.equal(5); 5.should.not.equal(6);
(new Object).should.not.equal(new Object);
auto obj = new Object; obj.should.equal(obj); obj.should.be(obj);
class SameyClass { override bool opEquals(Object o) { return true; } } (new SameyClass).should.not.be(new SameyClass); (new SameyClass).should.equal(new SameyClass);
The word .equal tests for equality. It takes one parameter and terminates the phrase. Its parameter is the expected value for the left-hand side of the should phrase.