(path string)
| 19 | var GenerateTestData = flag.Bool("regen", false, "Uses the current state to regenerate the test data.") |
| 20 | |
| 21 | func goldenPath(path string) string { |
| 22 | ext := filepath.Ext(path) |
| 23 | noext := strings.TrimSuffix(path, ext) |
| 24 | return noext + "_golden" + ext |
| 25 | } |
| 26 | |
| 27 | // CheckPlot checks a generated plot against a previously created reference. |
| 28 | // If GenerateTestData = true, it regenerates the reference. |