From 2b0a4ef917b411d43e9033f3095f78511d68c544 Mon Sep 17 00:00:00 2001 From: Rob Phoenix Date: Mon, 6 Mar 2017 10:10:57 +0000 Subject: [PATCH] accumulate: update tests see #414 Also removed unnecessary else block --- exercises/accumulate/accumulate_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/exercises/accumulate/accumulate_test.go b/exercises/accumulate/accumulate_test.go index 480f281fa..f9854e436 100644 --- a/exercises/accumulate/accumulate_test.go +++ b/exercises/accumulate/accumulate_test.go @@ -37,10 +37,8 @@ func TestTestVersion(t *testing.T) { func TestAccumulate(t *testing.T) { for _, test := range tests { actual := Accumulate(test.given, test.converter) - if fmt.Sprintf("%s", actual) != fmt.Sprintf("%s", test.expected) { - t.Fatalf("Accumulate(%s, %s): expected %s, actual %s", test.given, test.description, test.expected, actual) - } else { - t.Logf("PASS: %s %v", test.description, test.given) + if fmt.Sprintf("%q", actual) != fmt.Sprintf("%q", test.expected) { + t.Fatalf("Accumulate(%q, %q): expected %q, actual %q", test.given, test.description, test.expected, actual) } } }