wiki:Development/Testing

Version 23 (modified by benl, 7 years ago) (diff)

--

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, Main.dcl or Main.dcs 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.check 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.*, it simply compiles all the source files there.
  • For subdirectories containing a Test.dcx file it uses ddci-core to run the tests in it.
  • 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.