Weird expected string in daily test result

this is not a question, but instead just a friendly reminder that the daily tests highlight the wrong part of your output string by putting it inside the same kind of brackets [...] that are also used by the AST.
If you recieve feedback containing a syntactically wrong looking expected string, this might be caused by the highlighting.
E.g. this expected string seems syntactically wrong, but isn’t if you leave out the one [ that’s part of the highlighting:


I hope this helps someone, so he/she doesn’t have to spend as much time as I did trying to figure out what’s going on.


1 Like

Yes, JUnit tries to be helpful and highlights the difference between the strings (similar to how git shows diff) using bracket markers.
Usually, you can hold control and click on any function in Java (like assertEqualsNormalized, assertEquals, …) to see the source code.
You then see that JUnit returns a ComparisonFailure for string comparison that uses the ComparisonCompactor to show a concise message.

1 Like