MCPcopy
hub / github.com/nats-io/nats.go / TestCsv

Function TestCsv

bench/benchlib_test.go:190–202  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

188}
189
190func TestCsv(t *testing.T) {
191 bench := makeBench(1, 1)
192 csv := bench.CSV()
193 lines := strings.Split(csv, "\n")
194 if len(lines) != 4 {
195 t.Fatal("Expected 4 lines of output from the CSV string")
196 }
197
198 fields := strings.Split(lines[1], ",")
199 if len(fields) != 7 {
200 t.Fatal("Expected 7 fields")
201 }
202}
203
204func TestBenchStrings(t *testing.T) {
205 bench := makeBench(1, 1)

Callers

nothing calls this directly

Calls 2

makeBenchFunction · 0.85
CSVMethod · 0.80

Tested by

no test coverage detected