| 96 | } |
| 97 | |
| 98 | func TestRowNumberPreceding(t *testing.T) { |
| 99 | testCases := []struct { |
| 100 | start, preceding RowNumber |
| 101 | }{ |
| 102 | {RowNumber{1000, -1, -1, -1, -1, -1, -1, -1}, RowNumber{999, -1, -1, -1, -1, -1, -1, -1}}, |
| 103 | {RowNumber{1000, 0, 0, 0, 0, 0, 0, 0}, RowNumber{999, math.MaxInt32, math.MaxInt32, math.MaxInt32, math.MaxInt32, math.MaxInt32, math.MaxInt32, math.MaxInt32}}, |
| 104 | } |
| 105 | |
| 106 | for _, tc := range testCases { |
| 107 | require.Equal(t, tc.preceding, tc.start.Preceding()) |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | func TestColumnIterator(t *testing.T) { |
| 112 | for _, tc := range iterTestCases { |