blob: 9a5954fa008be7a370709f53560d5429d0bbac03 [file] [log] [blame]
@test
operation addShouldWorkWhenPreconditionIsSatisfied() {
assertEquals(3, 2.add(1));
}
@test
operation addShouldFailWhenPreconditionIsUnsatisfied() {
assertError(2.add(-1));
}
$pre i > 0
operation Integer add(i : Integer) : Integer {
return self + i;
}