-
Notifications
You must be signed in to change notification settings - Fork 64
Unintuitive error description #120
Comments
This should be a problem within We could either raise an issue/pr on their side or write our own implementation and formatting as for #121 |
I think aising a |
Another issue with this is that when you run the tests from the terminal it just prints AssertionError withouth the description...
|
@igorwojda: Can you check again? I think Test code
Seems pretty clear |
@javatarz test still fails for me with the wrong exception. Here is my dependency:
|
@igorwojda I didn't try this on an independent project. I must admit, I added this test inside the Kluent repo (specifically, this was under the JVM module, not the android one). Needs further investigation. |
You can easily reproduce this with my project.
|
I'll have time to look at it at the weekend. @igorwojda you could try this on a new Android project and/or new JVM project and compare the outputs of |
If executing Unexpected type is ok, then I will make a PR. |
I like that approach, a PR would be welcome :) |
Above tests works fine, however when we change our assertion to compare with
String
, notChar
:maxChar("a") shouldEqual "a"
...tests fails with very unintuitive error description
java.lang.AssertionError: Expected <a>, actual <a>.
It's quite easy to make such a mistake by a programmer, so maybe Kluent can address this issue in a better way eg. by checking if the string has a single character and converting it to Char or display data types in error description
The text was updated successfully, but these errors were encountered: