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

Function TestConcurrentCSVParsing

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

Source from the content-addressed store, hash-verified

433}
434
435func TestConcurrentCSVParsing(t *testing.T) {
436 lines := []string{
437 "Name,Age,City",
438 "John,30,NYC",
439 "Jane,25,LA",
440 "Bob,35,SF",
441 "Alice,28,Boston",
442 }
443
444 b := createNewBuffer()
445 b.sep = ','
446
447 for _, line := range lines {
448 err := addDRToBuffer(b, line, []int{}, []int{})
449 if err != nil {
450 t.Fatalf("addDRToBuffer() error = %v", err)
451 }
452 }
453
454 if b.rowLen != len(lines) {
455 t.Errorf("Expected %d rows, got %d", len(lines), b.rowLen)
456 }
457}
458
459// ========================================
460// Integration Tests

Callers

nothing calls this directly

Calls 2

createNewBufferFunction · 0.85
addDRToBufferFunction · 0.85

Tested by

no test coverage detected