======================================== Buffer Transformation Tests ======================================== ======================================== Buffer Query Tests ========================================
(t *testing.T)
| 221 | // ======================================== |
| 222 | |
| 223 | func TestBuffer_getCol(t *testing.T) { |
| 224 | type args struct { |
| 225 | i int |
| 226 | } |
| 227 | testBuffer, _ := createNewBufferWithData([][]string{{"a", "b", "c"}, {"1", "2", "3"}, {"4", "5", "6"}}, true) |
| 228 | tests := []struct { |
| 229 | name string |
| 230 | b *Buffer |
| 231 | args args |
| 232 | want []string |
| 233 | }{ |
| 234 | {"Get first column", testBuffer, args{i: 0}, []string{"a", "1", "4"}}, |
| 235 | } |
| 236 | for _, tt := range tests { |
| 237 | t.Run(tt.name, func(t *testing.T) { |
| 238 | if got := tt.b.getCol(tt.args.i); !reflect.DeepEqual(got, tt.want) { |
| 239 | t.Errorf("Buffer.getCol() = %v, want %v", got, tt.want) |
| 240 | } |
| 241 | }) |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | func TestBuffer_GetCol(t *testing.T) { |
| 246 | b := createNewBuffer() |
nothing calls this directly
no test coverage detected