use a raw string

This commit is contained in:
Peter Ebden 2018-01-21 22:15:01 +00:00
parent e7459a5405
commit eb29b62024
1 changed files with 8 additions and 7 deletions

View File

@ -1072,13 +1072,14 @@ func TestDumpOmitEmpty(t *testing.T) {
}
s1 := s{S1: &s{S2: &s{Int: 5}}}
actual := cfg.Sdump(s1)
expected := "(spew_test.s) {\n" +
"S1: (*spew_test.s)({\n" +
"S2: (*spew_test.s)({\n" +
"Int: (int) 5,\n" +
"}),\n" +
"}),\n" +
"}\n"
expected := `(spew_test.s) {
S1: (*spew_test.s)({
S2: (*spew_test.s)({
Int: (int) 5,
}),
}),
}
`
if actual != expected {
t.Errorf("Omit empty fields incorrect:\n %v %v", actual, expected)
}