(b *testing.B)
| 76 | } |
| 77 | |
| 78 | func BenchmarkIndexSelector(b *testing.B) { |
| 79 | var j int |
| 80 | |
| 81 | b.StopTimer() |
| 82 | sel := DocB().Find("#manual-nav dl dd:nth-child(1)") |
| 83 | b.StartTimer() |
| 84 | for i := 0; i < b.N; i++ { |
| 85 | j = sel.IndexSelector("dd") |
| 86 | } |
| 87 | if j != 4 { |
| 88 | b.Fatalf("want 4, got %d", j) |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | func BenchmarkIndexOfNode(b *testing.B) { |
| 93 | var j int |
nothing calls this directly
no test coverage detected