(b *testing.B)
| 38 | } |
| 39 | |
| 40 | func BenchmarkStringEnd_WithEscape(b *testing.B) { |
| 41 | // Slow path: contains an escaped quote so the per-byte walker runs. |
| 42 | data := []byte(`hello \"world"`) |
| 43 | b.SetBytes(int64(len(data))) |
| 44 | b.ResetTimer() |
| 45 | for i := 0; i < b.N; i++ { |
| 46 | _, _ = stringEnd(data) |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | // --- tokenEnd --------------------------------------------------------------- |
| 51 | // Common case: a bare scalar value (number, boolean, null) terminated by a |
nothing calls this directly
no test coverage detected