Context Navigation

Testing

Regression Testing

The war test driver automates regression testing.

$ make war

or

$ bin/war test

This tool descends into the given directory, and runs any tests it finds.

For subdirectories containing a Main.ds file, it builds and executes that program. The resulting binary is named Main.bin and placed in the same directory as the source. If there is also a Main.stdout file, then checks the program's output against this expected output. If there is any difference it prompts the user whether to stop testing, or update the expected output.

For subdirectories that do not contain a Main.ds, it simply compiles all the source files there.

If a subdirectory contains a Module.error.check file, where Module is some arbitrary module name, then compilation is expected to fail with the error message given by that check file.