https://kotlinlang.org logo
Title
n

nesl247

04/25/2017, 6:05 PM
inCompilationProduct.toCompiledProduct().shouldEqual(expected)
using Kluent. I’ve tried with assertEquals from Junit just to be sure it wasn’t something Kluent was doing, but it isn’t.
p

poohbar

04/25/2017, 6:07 PM
I would step into the
.equals
call and check why is it returning false.
equals is not comparing string representation of the object, so I think an extra space printed in the console is not the reason why the assert is failing
n

nesl247

04/25/2017, 6:08 PM
I have, it’s failing due to Kotlin’s equals() generation.
As far as I can see, the two are exactly the same. IntelliJ’s little link to show you the differences only has that ending space as the difference.
While debugging, when I get to the breakpoint on
expected.equals(actual)
, and I compare the string representation of both, they are identical according to IntelliJ.
Figured it out. I had a type issue somewhere. Downside to using Any, but maybe I’ll change that later. Thanks again!
p

poohbar

04/25/2017, 7:43 PM
glad you figured it out..