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

Function TestDiscreteStats_GetPlot

stats_test.go:210–224  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

208}
209
210func TestDiscreteStats_GetPlot(t *testing.T) {
211 ds := &DiscreteStats{}
212 data := []string{"A", "B", "A", "C", "A", "B", "A", "D", "A", "B"}
213
214 ds.summary(data)
215 plot := ds.getPlot()
216
217 if len(plot) == 0 {
218 t.Error("Expected plot output, got empty string")
219 }
220 if plot == "No data to plot" {
221 t.Error("Should generate plot for valid data")
222 }
223 t.Logf("Plot output:\n%s", plot)
224}
225
226func TestDiscreteStats_GetPlot_EmptyData(t *testing.T) {
227 ds := &DiscreteStats{}

Callers

nothing calls this directly

Calls 2

summaryMethod · 0.95
getPlotMethod · 0.95

Tested by

no test coverage detected