(b *testing.B)
| 39 | } |
| 40 | |
| 41 | func BenchmarkString(b *testing.B) { |
| 42 | input := []byte(`"abcdefghijklmnopqrstuvwxyz0123456789\\n\\t"`) |
| 43 | for i := 0; i < b.N; i++ { |
| 44 | dec := json.NewDecoder(input) |
| 45 | val, err := dec.Read() |
| 46 | if err != nil { |
| 47 | b.Fatal(err) |
| 48 | } |
| 49 | _ = val.ParsedString() |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | func BenchmarkBool(b *testing.B) { |
| 54 | input := []byte(`true`) |
nothing calls this directly
no test coverage detected