======================================== Plot Tests ========================================
(t *testing.T)
| 168 | // ======================================== |
| 169 | |
| 170 | func 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 | |
| 186 | func TestContinuousStats_GetPlot_EmptyData(t *testing.T) { |
| 187 | cs := &ContinuousStats{} |