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

Function TestType2Name

utils_test.go:216–234  ·  view source on GitHub ↗

======================================== Type Name Tests ========================================

(t *testing.T)

Source from the content-addressed store, hash-verified

214// ========================================
215
216func TestType2Name(t *testing.T) {
217 tests := []struct {
218 name string
219 colType int
220 expected string
221 }{
222 {"String type", colTypeStr, "Str"},
223 {"Float type", colTypeFloat, "Num"},
224 }
225
226 for _, tt := range tests {
227 t.Run(tt.name, func(t *testing.T) {
228 result := type2name(tt.colType)
229 if result != tt.expected {
230 t.Errorf("type2name(%d) = %s, want %s", tt.colType, result, tt.expected)
231 }
232 })
233 }
234}
235
236// Helper function
237func contains(s, substr string) bool {

Callers

nothing calls this directly

Calls 1

type2nameFunction · 0.85

Tested by

no test coverage detected