(b *testing.B)
| 33 | } |
| 34 | |
| 35 | func BenchmarkIsFunction(b *testing.B) { |
| 36 | var y bool |
| 37 | |
| 38 | b.StopTimer() |
| 39 | sel := DocW().Find(".toclevel-1") |
| 40 | f := func(i int, s *Selection) bool { |
| 41 | return i == 8 |
| 42 | } |
| 43 | b.StartTimer() |
| 44 | for i := 0; i < b.N; i++ { |
| 45 | y = sel.IsFunction(f) |
| 46 | } |
| 47 | if !y { |
| 48 | b.Fatal("want true") |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | func BenchmarkIsSelection(b *testing.B) { |
| 53 | var y bool |
nothing calls this directly
no test coverage detected
searching dependent graphs…