(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestManyIterator(t *testing.T) { |
| 10 | type searchTest struct { |
| 11 | name string |
| 12 | iterator shortIterator |
| 13 | high uint64 |
| 14 | buf []uint64 |
| 15 | expectedValue int |
| 16 | } |
| 17 | |
| 18 | tests := []searchTest{ |
| 19 | { |
| 20 | "no values", |
| 21 | shortIterator{}, |
| 22 | uint64(1024), |
| 23 | []uint64{}, |
| 24 | 0, |
| 25 | }, |
| 26 | { |
| 27 | "1 value ", |
| 28 | shortIterator{[]uint16{uint16(1)}, 0}, |
| 29 | uint64(1024), |
| 30 | make([]uint64, 1), |
| 31 | 1, |
| 32 | }, |
| 33 | } |
| 34 | |
| 35 | for _, testCase := range tests { |
| 36 | t.Run(testCase.name, func(t *testing.T) { |
| 37 | iterator := testCase.iterator |
| 38 | result := iterator.nextMany64(testCase.high, testCase.buf) |
| 39 | assert.Equal(t, testCase.expectedValue, result) |
| 40 | }) |
| 41 | } |
| 42 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…