(b *testing.B)
| 399 | } |
| 400 | |
| 401 | func BenchmarkAppendBool(b *testing.B) { |
| 402 | vs := []bool{true, false} |
| 403 | buf := make([]byte, 0, 1) |
| 404 | b.SetBytes(1) |
| 405 | b.ReportAllocs() |
| 406 | b.ResetTimer() |
| 407 | for i := 0; i < b.N; i++ { |
| 408 | AppendBool(buf[0:0], vs[i%2]) |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | func BenchmarkAppendTime(b *testing.B) { |
| 413 | t := time.Now() |
nothing calls this directly
no test coverage detected
searching dependent graphs…