(b *testing.B)
| 406 | } |
| 407 | |
| 408 | func BenchmarkUnrollInverse(b *testing.B) { |
| 409 | for api, testsize := range testSizes { |
| 410 | b.Run(testsize.Name, func(b *testing.B) { |
| 411 | verify := verifyIndex[api] |
| 412 | ap := testsize.AP |
| 413 | b.SetBytes(int64(ap.TotalSize())) |
| 414 | for i := 0; i < b.N; i++ { |
| 415 | it := unrollinverse.NewIterator(ap) |
| 416 | total := 0 |
| 417 | for index, err := it.Next(); err == nil; index, err = it.Next() { |
| 418 | total += verify[index] * index |
| 419 | } |
| 420 | _ = total |
| 421 | } |
| 422 | }) |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | func TestUnrollInReverse(t *testing.T) { |
| 427 | testIterator(t, func(ap *shape.AP) Iterator { return unrollinreverse.NewIterator(ap) }) |
nothing calls this directly
no test coverage detected