1
0

Use output of strings.Builder in assert.Equal (#106)

This commit is contained in:
Markus Wüstenberg 2022-09-21 10:37:44 +02:00 committed by GitHub
parent f4da48fb57
commit 3e992ed66c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ func Equal(t *testing.T, expected string, actual g.Node) {
var b strings.Builder
_ = actual.Render(&b)
if expected != b.String() {
t.Fatalf(`expected "%v" but got "%v"`, expected, actual)
t.Fatalf(`expected "%v" but got "%v"`, expected, b.String())
}
}