truth icon indicating copy to clipboard operation
truth copied to clipboard

Recognize item boundaries when creating diff strings

Open dinesh707 opened this issue 8 years ago • 1 comments

As discussed on the ticket https://github.com/google/truth/issues/239,

Currently a diff would print as (in this case bytes are coded to hex) Not true that <(byte[]) [0, 1]> is equal to <[1, 0]>; expected:<0[100]> but was:<0[001]>

But the resulting output is not very clean since the diff window do not follow or know the rule about 2 chars for a byte in hex. This may apply in other cases of array comparisons. (I haven't tested the scenario) Array 1 : 1112, 2223, 3333
Array 2 : 1111, 3456, 6333 Will/May create a diff like <111[2, 2223, 3]333> but was <111[1, 3456, 6]333>

dinesh707 avatar Feb 22 '17 22:02 dinesh707

I went tough the JUnit code. It seems trying to override will give only very minor benefit and whole lot of unnecessary amount of work. This can be closed or marked very minor.

dinesh707 avatar Feb 28 '17 11:02 dinesh707