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
{{ message }}
Repository navigation
Assert.AreEqual string: consider replacing whitespaces by a symbol #6716
Since v4 we replace common formatting characters with their visible version. Except for spaces and tabs. We don't control how they are rendered, we just change the character to visible.
Space is not replaced because it impacts readability of longer text when spaces are not the difference.
Tab is not replaced because it would break formatting of text. But in this case it probably does not matter as much since it is 1 line only.
We do however have the indicator of where the difference is, which should make it even more obvious where the difference is.
I think we could have a heuristic here specific to multi-line diffing, similar to how the diffing from Roslyn testing library works. I think Roslyn testing uses https://github.com/mmanela/diffplex. I'm not sure how feasible it is to add such extra dependency to MSTest. Or alternatively, we copy the needed parts from DiffPlex with license notice (we might want to confirm with CELA about the licensing stuff and whether we can copy from DiffPlex).
We might even consider if DiffPlex provides good diffing for single-line and use that instead.
Activity
nohwnd commentedon Oct 10, 2025
Since v4 we replace common formatting characters with their visible version. Except for spaces and tabs. We don't control how they are rendered, we just change the character to visible.
Space is not replaced because it impacts readability of longer text when spaces are not the difference.
Tab is not replaced because it would break formatting of text. But in this case it probably does not matter as much since it is 1 line only.
We do however have the indicator of where the difference is, which should make it even more obvious where the difference is.
Youssef1313 commentedon Oct 12, 2025
I think we could have a heuristic here specific to multi-line diffing, similar to how the diffing from Roslyn testing library works. I think Roslyn testing uses https://github.com/mmanela/diffplex. I'm not sure how feasible it is to add such extra dependency to MSTest. Or alternatively, we copy the needed parts from DiffPlex with license notice (we might want to confirm with CELA about the licensing stuff and whether we can copy from DiffPlex).
We might even consider if DiffPlex provides good diffing for single-line and use that instead.
Youssef1313 commentedon Nov 1, 2025
Related: #6771
Evangelink commentedon May 15, 2026
It won't be necessary with the new format, so closing