Skip to content

Commit

Permalink
Merge pull request #567 from robphoenix/update/accumulate
Browse files Browse the repository at this point in the history
accumulate: update tests
  • Loading branch information
robphoenix authored Mar 6, 2017
2 parents 49b0af2 + 2b0a4ef commit 2546e42
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions exercises/accumulate/accumulate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 2546e42

Please sign in to comment.