and something else fails throwing a different error type, all I see is:
expected to be instance of:<class java.lang.IllegalArgumentException> but had class:<class java.lang.AssertionError> (Failure(java.lang.AssertionError))
That isn't helpful!
It's a special casing, but in the case of the "actual" being a Throwable or a Result that's a failure, I think the fail function should add that Throwable as the cause to the AssertionFailedError.
This would provide me with the complete stacktrace of the unexpected failure and not just that the type or message disagrees.
We do this in Turbine and it's excellent. I would like it here, too!
If I do
and something else fails throwing a different error type, all I see is:
That isn't helpful!
It's a special casing, but in the case of the "actual" being a
Throwable
or aResult
that's a failure, I think thefail
function should add thatThrowable
as the cause to theAssertionFailedError
.This would provide me with the complete stacktrace of the unexpected failure and not just that the type or message disagrees.
We do this in Turbine and it's excellent. I would like it here, too!