(b *testing.B)
| 384 | } |
| 385 | |
| 386 | func BenchmarkUnrollReverse(b *testing.B) { |
| 387 | for api, testsize := range testSizes { |
| 388 | b.Run(testsize.Name, func(b *testing.B) { |
| 389 | verify := verifyIndex[api] |
| 390 | ap := testsize.AP |
| 391 | b.SetBytes(int64(ap.TotalSize())) |
| 392 | for i := 0; i < b.N; i++ { |
| 393 | it := unrollreverse.NewIterator(ap) |
| 394 | total := 0 |
| 395 | for index, err := it.Next(); err == nil; index, err = it.Next() { |
| 396 | total += verify[index] * index |
| 397 | } |
| 398 | _ = total |
| 399 | } |
| 400 | }) |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | func TestUnrollInverse(t *testing.T) { |
| 405 | testIterator(t, func(ap *shape.AP) Iterator { return unrollinverse.NewIterator(ap) }) |
nothing calls this directly
no test coverage detected