You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output for different strings just prints the two strings on separate lines. This is fine for short strings, but for longer ones, especially multiline, it can be difficult to find where exactly the difference is. We could take inspiration from other assertion libraries that indicate at which character position the strings begin to differ, and only print the section of the string around that position.
Hint for the person who wants to take up this issue: I think the best way to go would be to add a case String of x1: string * x2: string to the type Diff. This case would be used in Differ.diffWith instead of simpleEquality (which returns a Diff.Value). Its display format would then be applied in DiffPrinter.toStreamImpl.
The text was updated successfully, but these errors were encountered:
The output for different strings just prints the two strings on separate lines. This is fine for short strings, but for longer ones, especially multiline, it can be difficult to find where exactly the difference is. We could take inspiration from other assertion libraries that indicate at which character position the strings begin to differ, and only print the section of the string around that position.
Hint for the person who wants to take up this issue: I think the best way to go would be to add a case
String of x1: string * x2: string
to the typeDiff
. This case would be used inDiffer.diffWith
instead ofsimpleEquality
(which returns aDiff.Value
). Its display format would then be applied in DiffPrinter.toStreamImpl.The text was updated successfully, but these errors were encountered: