(t *testing.T)
| 243 | } |
| 244 | |
| 245 | func TestBuffer_GetCol(t *testing.T) { |
| 246 | b := createNewBuffer() |
| 247 | _ = b.contAppendSli([]string{"A", "B", "C"}, false) |
| 248 | _ = b.contAppendSli([]string{"1", "2", "3"}, false) |
| 249 | _ = b.contAppendSli([]string{"X", "Y", "Z"}, false) |
| 250 | |
| 251 | col := b.getCol(1) |
| 252 | expected := []string{"B", "2", "Y"} |
| 253 | |
| 254 | if len(col) != len(expected) { |
| 255 | t.Errorf("getCol() returned %d elements, want %d", len(col), len(expected)) |
| 256 | } |
| 257 | |
| 258 | for i, val := range col { |
| 259 | if val != expected[i] { |
| 260 | t.Errorf("getCol()[%d] = %s, want %s", i, val, expected[i]) |
| 261 | } |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | func TestBuffer_GetColType(t *testing.T) { |
| 266 | b := createNewBuffer() |
nothing calls this directly
no test coverage detected