Skip to content

Assert.AreEqual string: consider replacing whitespaces by a symbol #6716

@Evangelink

Description

@Evangelink

Describe the bug

When reviewing diffs for Assert.AreEqual of strings, it's sometimes uneasy to understand how many spaces there are. Let's take:

Assert.AreEqual failed. Expected string length 199 but was 139. 'expected' expression: 'Normalize(expected)', 'actual' expression: 'Normalize(actual)'.
Expected: "...n 1; }␊    #endregion␊␊    #region ..."
But was:  "...n 1; }␊    #endregion␊    #endregion␊}"

Expected behavior

Space is replaced with a symbol:

  • - Space (U+2423 OPEN BOX)
  • · - Middle dot

Nit: if that's not already handled, also consider replacing tabs:

- Tab (can also use or )

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions