(t *testing.T)
| 156 | } |
| 157 | |
| 158 | func TestColumnDecoder_ZeroPositionCount(t *testing.T) { |
| 159 | empty := func() *bytes.Reader { return bytes.NewReader([]byte{}) } |
| 160 | |
| 161 | t.Run("Int32ArrayColumnDecoder", func(t *testing.T) { |
| 162 | col, err := (&Int32ArrayColumnDecoder{}).ReadColumn(empty(), INT32, 0) |
| 163 | if err != nil { |
| 164 | t.Fatalf("ReadColumn failed: %v", err) |
| 165 | } |
| 166 | if col.GetPositionCount() != 0 { |
| 167 | t.Errorf("expected positionCount=0, got %d", col.GetPositionCount()) |
| 168 | } |
| 169 | }) |
| 170 | |
| 171 | t.Run("Int64ArrayColumnDecoder", func(t *testing.T) { |
| 172 | col, err := (&Int64ArrayColumnDecoder{}).ReadColumn(empty(), INT64, 0) |
| 173 | if err != nil { |
| 174 | t.Fatalf("ReadColumn failed: %v", err) |
| 175 | } |
| 176 | if col.GetPositionCount() != 0 { |
| 177 | t.Errorf("expected positionCount=0, got %d", col.GetPositionCount()) |
| 178 | } |
| 179 | }) |
| 180 | |
| 181 | t.Run("ByteArrayColumnDecoder", func(t *testing.T) { |
| 182 | col, err := (&ByteArrayColumnDecoder{}).ReadColumn(empty(), BOOLEAN, 0) |
| 183 | if err != nil { |
| 184 | t.Fatalf("ReadColumn failed: %v", err) |
| 185 | } |
| 186 | if col.GetPositionCount() != 0 { |
| 187 | t.Errorf("expected positionCount=0, got %d", col.GetPositionCount()) |
| 188 | } |
| 189 | }) |
| 190 | |
| 191 | t.Run("BinaryArrayColumnDecoder", func(t *testing.T) { |
| 192 | col, err := (&BinaryArrayColumnDecoder{}).ReadColumn(empty(), TEXT, 0) |
| 193 | if err != nil { |
| 194 | t.Fatalf("ReadColumn failed: %v", err) |
| 195 | } |
| 196 | if col.GetPositionCount() != 0 { |
| 197 | t.Errorf("expected positionCount=0, got %d", col.GetPositionCount()) |
| 198 | } |
| 199 | }) |
| 200 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…