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

Function TestContinuousStats_GetPlot

stats_test.go:170–184  ·  view source on GitHub ↗

======================================== Plot Tests ========================================

(t *testing.T)

Source from the content-addressed store, hash-verified

168// ========================================
169
170func TestContinuousStats_GetPlot(t *testing.T) {
171 cs := &ContinuousStats{}
172 data := []string{"10", "20", "15", "25", "30", "18", "22", "27", "12", "16"}
173
174 cs.summary(data)
175 plot := cs.getPlot()
176
177 if len(plot) == 0 {
178 t.Error("Expected plot output, got empty string")
179 }
180 if plot == "No data to plot" {
181 t.Error("Should generate plot for valid data")
182 }
183 t.Logf("Plot output:\n%s", plot)
184}
185
186func TestContinuousStats_GetPlot_EmptyData(t *testing.T) {
187 cs := &ContinuousStats{}

Callers

nothing calls this directly

Calls 2

summaryMethod · 0.95
getPlotMethod · 0.95

Tested by

no test coverage detected