MCPcopy Create free account
hub / github.com/egonelbre/exp / init

Function init

niterator/iterator_test.go:49–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47)
48
49func init() {
50 for api, testsize := range testSizes {
51 ap := testsize.AP
52 verify := make([]int, ap.TotalSize())
53
54 it := basic.NewIterator(ap)
55 i := 0
56 for index, err := it.Next(); err == nil; index, err = it.Next() {
57 i++
58 verify[index] = i
59 }
60 for _, v := range verify {
61 if v == 0 {
62 panic("invalid iterator")
63 }
64 }
65
66 verifyIndex[api] = verify
67 }
68}
69
70func testIterator(t *testing.T, newiterator func(ap *shape.AP) Iterator) {
71 t.Helper()

Callers

nothing calls this directly

Calls 3

NextMethod · 0.95
NewIteratorFunction · 0.92
TotalSizeMethod · 0.80

Tested by

no test coverage detected