MCPcopy Index your code
hub / github.com/apache/iotdb-client-go / TestColumnDecoder_ZeroPositionCount

Function TestColumnDecoder_ZeroPositionCount

client/column_decoder_test.go:158–200  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

156}
157
158func 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}

Callers

nothing calls this directly

Calls 2

ReadColumnMethod · 0.65
GetPositionCountMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…