Regression Testing

The war test driver automates regression testing.

$ make war


$ 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.

Running individual tests

Files named Main.dcl or Main.dcs can be compiled and run from the top-level directory.

$ bin/ddc --make test/ddc-main/60-Lite/99-Defib/03-Reverse/Main.dcl
$ test/ddc-main/60-Lite/99-Defib/03-Reverse/Main 

Note that they must be compiled and run from the top-level directory so that DDC can find the runtime system and base libraries under ./code.

Last modified 4 years ago Last modified on Dec 5, 2012, 11:25:42 AM