From e1eee80afa1ddf579aea52435c69813459ce3811 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Fri, 20 Sep 2019 13:47:09 -0400 Subject: Use %q format string --- caesar_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/caesar_test.go b/caesar_test.go index 9754edd..008cccc 100644 --- a/caesar_test.go +++ b/caesar_test.go @@ -6,7 +6,7 @@ import ( func TestEncode(t *testing.T) { msg := "Attack at dawn" - t.Logf("testing message %s", msg) + t.Logf("testing message %q", msg) if Encode(msg) != "Dwwdfn dw gdzq" { t.Fail() } @@ -42,7 +42,7 @@ func TestEncoderTable(t *testing.T) { for _, test := range tests { result := Encode(test.in) if result != test.out { - t.Errorf("encode %s: expected %s, got %s", test.in, test.out, result) + t.Errorf("encode %q: expected %q, got %q", test.in, test.out, result) } } } -- cgit v1.2.3