annacrombie / plot

plot on the command line
MIT License
113 stars 9 forks source link

test: implement simple tests of the various plot features #10

Closed AdrianDC closed 3 years ago

annacrombie commented 3 years ago

These seem less like tests and more like examples. If you want them to be tests you should implement some checking of validity. You could write the output of plot to a file and compare it to some previously generated output. Also, you should hook in with meson's testing system

If you would rather them just be examples, then just rename tests to examples

AdrianDC commented 3 years ago

I implemented a GitHub Actions configuration to run the plot tests introduced here.

Validation is done at the code, arguments, calculations, rendering and animations levels, only the exact curves output is not the goal of these tests.

Pipeline example after this PR: https://github.com/AdrianDC/plot/actions/runs/490378600

Depends on the other PRs already on review.

annacrombie commented 3 years ago

Okay, I like this a lot better. Removing the sleep 1 from the test helper, and adding some valgrind tests are nice additions. I still would like the tests to be hooked in to meson, but that is something small I can add later.

The only thing I'd like to change is the CI build. I prefer sourcehut's CI, and am also more familiar with it. Again this is something I could change myself after merging this.

AdrianDC commented 3 years ago

I'm more a GitLab CI heavy user myself as you may find, but using GitHub Actions for this project proved to be rather strait forward and surprisingly performant.

The only thing I'd like to change on this basis would be rewritten log outputs upon redraws, to avoid the 17 000 lines of progress outputs.