In "Expander tests", we expand some programs, we match on the resulting AST, and we check that the results are as expected.
In "Hedgehog tests", we run some property tests.
In "Golden tests", we run all the files in the examples folder, and we check that the results are as expected in the corresponding .golden file.
The golden tests are much more convenient than the expander tests, because the .golden file is created automatically if it is missing. Most of the expander tests, which were written before we had golden tests, can and should be replaced by golden tests. Currently, we only bother migrating an expander test to a golden test when the Klister implementation changes in a way which causes an expander test to fail. It would be nice to get rid of all of them once and for all.
./tests/Test.hs
runs three kinds of tests:examples
folder, and we check that the results are as expected in the corresponding.golden
file.The golden tests are much more convenient than the expander tests, because the
.golden
file is created automatically if it is missing. Most of the expander tests, which were written before we had golden tests, can and should be replaced by golden tests. Currently, we only bother migrating an expander test to a golden test when the Klister implementation changes in a way which causes an expander test to fail. It would be nice to get rid of all of them once and for all.