fix stringutil tests
Change-Id: Ie6ad5645ac6fca6af22376f2fda00e1c4772ae19
diff --git a/stringutil/reverse_test.go b/stringutil/reverse_test.go
index 263a420..3a2337f 100644
--- a/stringutil/reverse_test.go
+++ b/stringutil/reverse_test.go
@@ -19,7 +19,7 @@
import "testing"
func TestReverse(t *testing.T) {
- for _, c := range struct {
+ for _, c := range []struct {
in, want string
}{
{"Hello, world", "dlrow ,olleH"},
@@ -27,8 +27,8 @@
{"", ""},
} {
got := Reverse(c.in)
- if got != want {
- t.Errorf("Reverse(%q) == %q, want %q", c.in, got, want)
+ if got != c.want {
+ t.Errorf("Reverse(%q) == %q, want %q", c.in, got, c.want)
}
}
}