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

Function TestGetColumnMaxWidth_Valid

utils_test.go:147–159  ·  view source on GitHub ↗

======================================== Column Width Tests ========================================

(t *testing.T)

Source from the content-addressed store, hash-verified

145// ========================================
146
147func TestGetColumnMaxWidth_Valid(t *testing.T) {
148 // Initialize wrapped columns map
149 wrappedColumns = make(map[int]int)
150
151 // Create a test buffer
152 b = createNewBuffer()
153 _ = b.contAppendSli([]string{"Short", "Medium", "VeryLongText"}, false)
154
155 width := getColumnMaxWidth(0)
156 if width < 1 {
157 t.Error("getColumnMaxWidth should return positive width")
158 }
159}
160
161func TestGetColumnMaxWidth_Custom(t *testing.T) {
162 wrappedColumns = make(map[int]int)

Callers

nothing calls this directly

Calls 3

createNewBufferFunction · 0.85
getColumnMaxWidthFunction · 0.85
contAppendSliMethod · 0.80

Tested by

no test coverage detected