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

Function TestLoadPipeToBuffer_LargeData

io_test.go:171–187  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

169}
170
171func TestLoadPipeToBuffer_LargeData(t *testing.T) {
172 var buf bytes.Buffer
173 buf.WriteString("ID,Value\n")
174 for i := 0; i < 1000; i++ {
175 buf.WriteString(I2S(i) + ",Data" + I2S(i) + "\n")
176 }
177
178 b := createNewBuffer()
179 err := loadPipeToBuffer(&buf, b)
180 if err != nil {
181 t.Fatalf("loadPipeToBuffer() error = %v", err)
182 }
183
184 if b.rowLen != 1001 {
185 t.Errorf("Expected 1001 rows, got %d", b.rowLen)
186 }
187}
188
189// ========================================
190// Async Loading Tests

Callers

nothing calls this directly

Calls 3

I2SFunction · 0.85
createNewBufferFunction · 0.85
loadPipeToBufferFunction · 0.85

Tested by

no test coverage detected