(t *testing.T)
| 208 | } |
| 209 | |
| 210 | func 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 | |
| 226 | func TestDiscreteStats_GetPlot_EmptyData(t *testing.T) { |
| 227 | ds := &DiscreteStats{} |