fix tests

This commit is contained in:
tidwall 2018-08-31 16:55:59 -06:00
parent 3bd9019eb0
commit bd0e703dc8
1 changed files with 13 additions and 12 deletions

View File

@ -221,7 +221,7 @@ func BenchmarkSet(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if res != expect { if res != expect {
t.Fatal("expected '%v', got '%v'", expect, res) t.Fatalf("expected '%v', got '%v'", expect, res)
} }
} }
} }
@ -234,7 +234,7 @@ func BenchmarkSetRaw(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if res != expect { if res != expect {
t.Fatal("expected '%v', got '%v'", expect, res) t.Fatalf("expected '%v', got '%v'", expect, res)
} }
} }
} }
@ -247,7 +247,7 @@ func BenchmarkSetBytes(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if bytes.Compare(res, expectBytes) != 0 { if bytes.Compare(res, expectBytes) != 0 {
t.Fatal("expected '%v', got '%v'", expect, res) t.Fatalf("expected '%v', got '%v'", expect, res)
} }
} }
} }
@ -260,7 +260,7 @@ func BenchmarkSetRawBytes(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if bytes.Compare(res, expectBytes) != 0 { if bytes.Compare(res, expectBytes) != 0 {
t.Fatal("expected '%v', got '%v'", expect, res) t.Fatalf("expected '%v', got '%v'", expect, res)
} }
} }
} }
@ -273,7 +273,7 @@ func BenchmarkSetOptimistic(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if res != expect { if res != expect {
t.Fatal("expected '%v', got '%v'", expect, res) t.Fatalf("expected '%v', got '%v'", expect, res)
} }
} }
} }
@ -286,7 +286,7 @@ func BenchmarkSetInPlace(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if res != expect { if res != expect {
t.Fatal("expected '%v', got '%v'", expect, res) t.Fatalf("expected '%v', got '%v'", expect, res)
} }
} }
} }
@ -299,7 +299,7 @@ func BenchmarkSetRawOptimistic(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if res != expect { if res != expect {
t.Fatal("expected '%v', got '%v'", expect, res) t.Fatalf("expected '%v', got '%v'", expect, res)
} }
} }
} }
@ -312,7 +312,7 @@ func BenchmarkSetRawInPlace(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if res != expect { if res != expect {
t.Fatal("expected '%v', got '%v'", expect, res) t.Fatalf("expected '%v', got '%v'", expect, res)
} }
} }
} }
@ -325,7 +325,7 @@ func BenchmarkSetBytesOptimistic(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if bytes.Compare(res, expectBytes) != 0 { if bytes.Compare(res, expectBytes) != 0 {
t.Fatal("expected '%v', got '%v'", string(expectBytes), string(res)) t.Fatalf("expected '%v', got '%v'", string(expectBytes), string(res))
} }
} }
} }
@ -339,7 +339,7 @@ func BenchmarkSetBytesInPlace(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if bytes.Compare(res, expectBytes) != 0 { if bytes.Compare(res, expectBytes) != 0 {
t.Fatal("expected '%v', got '%v'", string(expectBytes), string(res)) t.Fatalf("expected '%v', got '%v'", string(expectBytes), string(res))
} }
} }
} }
@ -352,7 +352,7 @@ func BenchmarkSetRawBytesOptimistic(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if bytes.Compare(res, expectBytes) != 0 { if bytes.Compare(res, expectBytes) != 0 {
t.Fatal("expected '%v', got '%v'", string(expectBytes), string(res)) t.Fatalf("expected '%v', got '%v'", string(expectBytes), string(res))
} }
} }
} }
@ -366,7 +366,7 @@ func BenchmarkSetRawBytesInPlace(t *testing.B) {
t.Fatal(err) t.Fatal(err)
} }
if bytes.Compare(res, expectBytes) != 0 { if bytes.Compare(res, expectBytes) != 0 {
t.Fatal("expected '%v', got '%v'", string(expectBytes), string(res)) t.Fatalf("expected '%v', got '%v'", string(expectBytes), string(res))
} }
} }
} }
@ -985,6 +985,7 @@ func easyjsonDbb23193Decode1(in *jlexer.Lexer, out *struct {
} }
in.Delim('}') in.Delim('}')
} }
func easyjsonDbb23193Encode1(out *jwriter.Writer, in struct { func easyjsonDbb23193Encode1(out *jwriter.Writer, in struct {
Title string "json:\"title\"" Title string "json:\"title\""
Name string "json:\"name\"" Name string "json:\"name\""