I have the following Eiffel code. I am doing test-driven-design with contracts.
check
sorter.sorted (<<1>>).is_equal (<<1>>)
end
The code correctly detects that my sort returns the wrong value. However it would be nice to see what sorted
returned. I can see that it is too late as is_equals
consumes both values, and returns false, before the check throws the exception.
I have seen in other testing frameworks they have a special is_equal
for the test framework. That allows better feedback. e.g.
check_equal(expected, value_under_test)
Is there anything like this in eiffel?