Skip to content

Commit

Permalink
test: Add expected vs. actual values to TestYamlWriter for Windows te…
Browse files Browse the repository at this point in the history
…st debugging
  • Loading branch information
nhubbard committed May 9, 2024
1 parent 7342097 commit 119a61a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class TestYamlWriter {
val subject = provider()
val writer = StringWriter()
subject.toWriter(writer)
println("Expected: ${expectedString.replace("\r", "\\r").replace("\n", "\\n")}")
println("Actual: ${writer.toString().replace("\r", "\\r").replace("\n", "\\n")}")
assertEquals(writer.toString(), expectedString)
}

Expand All @@ -61,6 +63,8 @@ class TestYamlWriter {
val subject = provider()
val outputStream = ByteArrayOutputStream()
subject.toOutputStream(outputStream)
println("Expected: ${expectedString.replace("\r", "\\r").replace("\n", "\\n")}")
println("Actual: ${outputStream.toString().replace("\r", "\\r").replace("\n", "\\n")}")
assertEquals(outputStream.toString(), expectedString)
}
}

0 comments on commit 119a61a

Please sign in to comment.