(b *testing.B)
| 3 | import "testing" |
| 4 | |
| 5 | func BenchmarkParser(b *testing.B) { |
| 6 | const source = ` |
| 7 | /* |
| 8 | Showing worst case scenario |
| 9 | */ |
| 10 | let value = trim("contains escapes \n\"\\ \U0001F600 and non ASCII ñ"); // inline comment |
| 11 | len(value) == 0x2A |
| 12 | // let's introduce an error too |
| 13 | whatever |
| 14 | ` |
| 15 | b.ReportAllocs() |
| 16 | p := new(Parser) |
| 17 | for i := 0; i < b.N; i++ { |
| 18 | p.Parse(source, nil) |
| 19 | } |
| 20 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…