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

Function TestBuffer_ResizeCol

buffer_test.go:105–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

103}
104
105func TestBuffer_ResizeCol(t *testing.T) {
106 b := createNewBuffer()
107 _ = b.contAppendSli([]string{"A", "B"}, false)
108 _ = b.contAppendSli([]string{"1", "2"}, false)
109
110 b.resizeCol(4)
111
112 if b.colLen != 4 {
113 t.Errorf("resizeCol(4) set colLen = %d, want 4", b.colLen)
114 }
115
116 for _, row := range b.cont {
117 if len(row) != 4 {
118 t.Errorf("Row length = %d, want 4", len(row))
119 }
120 }
121}
122
123// ========================================
124// Buffer Sorting Tests

Callers

nothing calls this directly

Calls 3

createNewBufferFunction · 0.85
contAppendSliMethod · 0.80
resizeColMethod · 0.80

Tested by

no test coverage detected