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

Function TestBuffer_ResizeColMultipleTimes

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

Source from the content-addressed store, hash-verified

384}
385
386func TestBuffer_ResizeColMultipleTimes(t *testing.T) {
387 b := createNewBuffer()
388 _ = b.contAppendSli([]string{"A", "B"}, false)
389
390 b.resizeCol(5)
391 if b.colLen != 5 {
392 t.Errorf("Expected colLen=5, got %d", b.colLen)
393 }
394
395 // resizeCol doesn't shrink columns, only extends them
396 // So after resize to 3, it should stay at 5
397 b.resizeCol(3)
398 if b.colLen < 3 {
399 t.Errorf("Expected colLen >= 3, got %d", b.colLen)
400 }
401}

Callers

nothing calls this directly

Calls 3

createNewBufferFunction · 0.85
contAppendSliMethod · 0.80
resizeColMethod · 0.80

Tested by

no test coverage detected