CheckPlot checks a generated plot against a previously created reference. If GenerateTestData = true, it regenerates the reference. For image.Image formats, a base64 encoded png representation is output to the testing log when a difference is identified.
(ExampleFunc func(), t *testing.T, filenames ...string)
| 29 | // For image.Image formats, a base64 encoded png representation is output to |
| 30 | // the testing log when a difference is identified. |
| 31 | func CheckPlot(ExampleFunc func(), t *testing.T, filenames ...string) { |
| 32 | t.Helper() |
| 33 | |
| 34 | CheckPlotApprox(ExampleFunc, t, 0, filenames...) |
| 35 | } |
| 36 | |
| 37 | // CheckPlotApprox checks a generated plot against a previously created reference. |
| 38 | // The normalized delta parameter describes how tight the matching should be |