MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / TestBuffer_getCol

Function TestBuffer_getCol

buffer_test.go:223–243  ·  view source on GitHub ↗

======================================== Buffer Transformation Tests ======================================== ======================================== Buffer Query Tests ========================================

(t *testing.T)

Source from the content-addressed store, hash-verified

221// ========================================
222
223func 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
245func TestBuffer_GetCol(t *testing.T) {
246 b := createNewBuffer()

Callers

nothing calls this directly

Calls 2

createNewBufferWithDataFunction · 0.85
getColMethod · 0.80

Tested by

no test coverage detected