3 ms·
You can use a form like: assert_that(foo, is_equal_to(bar)); Which makes it sort of clear that foo is the actual value, and bar is the expected. Especially
by twic 8y ago
You can use a form like:
assert_that(foo, is_equal_to(bar));
Which makes it sort of clear that foo is the actual value, and bar is the expected. Especially when you also see things like:
assert_that(foo, is_not_zero());
Perhaps that's what you mean by 'BDD-style interfaces'.
- masklinn 8y ago> Perhaps that's what you mean by 'BDD-style interfaces'. Yes. It's usually a more OO shape but usually along the lines of `foo.should.be.equal.to(bar)` or somesuch, a "natural" reading makes it pretty likely the parameter is the expected value.