(t *testing.T)
| 78 | } |
| 79 | |
| 80 | func TestRunOffset(t *testing.T) { |
| 81 | v := newRunContainer16TakeOwnership([]interval16{newInterval16Range(34, 39)}) |
| 82 | offtest := uint16(65500) |
| 83 | l, h := v.addOffset(offtest) |
| 84 | |
| 85 | expected := []int{65534, 65535, 65536, 65537, 65538, 65539} |
| 86 | wout := make([]int, len(expected)) |
| 87 | |
| 88 | var w0card, w1card int |
| 89 | |
| 90 | if l != nil { |
| 91 | w0card = l.getCardinality() |
| 92 | |
| 93 | for i := 0; i < w0card; i++ { |
| 94 | wout[i] = l.selectInt(uint16(i)) |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | if h != nil { |
| 99 | w1card = h.getCardinality() |
| 100 | |
| 101 | for i := 0; i < w1card; i++ { |
| 102 | wout[i+w0card] = h.selectInt(uint16(i)) + 65536 |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | assert.Equal(t, v.getCardinality(), w0card+w1card) |
| 107 | for i, x := range wout { |
| 108 | assert.Equal(t, expected[i], x) |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | func TestRunArrayUnionToRuns(t *testing.T) { |
| 113 | arrayArg := newArrayContainerRange(0, 10) |
nothing calls this directly
no test coverage detected
searching dependent graphs…