(b *testing.B)
| 202 | } |
| 203 | |
| 204 | func BenchmarkOnearr(b *testing.B) { |
| 205 | for api, testsize := range testSizes { |
| 206 | b.Run(testsize.Name, func(b *testing.B) { |
| 207 | verify := verifyIndex[api] |
| 208 | ap := testsize.AP |
| 209 | b.SetBytes(int64(ap.TotalSize())) |
| 210 | for i := 0; i < b.N; i++ { |
| 211 | it := onearr.NewIterator(ap) |
| 212 | total := 0 |
| 213 | for index, err := it.Next(); err == nil; index, err = it.Next() { |
| 214 | total += verify[index] * index |
| 215 | } |
| 216 | _ = total |
| 217 | } |
| 218 | }) |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | func TestOnearrRev(t *testing.T) { |
| 223 | testIterator(t, func(ap *shape.AP) Iterator { return onearrrev.NewIterator(ap) }) |
nothing calls this directly
no test coverage detected