From bd0e703dc80c48853f9d8376f5e91a0a4ec2b638 Mon Sep 17 00:00:00 2001 From: tidwall Date: Fri, 31 Aug 2018 16:55:59 -0600 Subject: [PATCH] fix tests --- sjson_test.go | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/sjson_test.go b/sjson_test.go index a7a8f7e..917becf 100644 --- a/sjson_test.go +++ b/sjson_test.go @@ -221,7 +221,7 @@ func BenchmarkSet(t *testing.B) { t.Fatal(err) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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) } 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('}') } + func easyjsonDbb23193Encode1(out *jwriter.Writer, in struct { Title string "json:\"title\"" Name string "json:\"name\""