Skip to content
Brian Schott edited this page Aug 5, 2015 · 1 revision

DCD's regression tests are located in the "tests" folder.

Test runner

Running the tests is performed by the "run_tests.sh" script. This script does the following things:

  • Shuts down any instance of dcd-server that's already running.
  • Starts up dcd-server with a command-line argument telling it to ignore the user's configuration and another argument telling the server to look for imports in the "tests/imports" folder.
  • For each folder in "tests", changes to the folder and runs the "run.sh" script in that folder.
  • Shuts down the server.
  • Totals the number of passing and failed test cases.

Test cases

Test cases consist of a folder with the following contents:

  • One or or more D files that will be used to test DCD's behavior.
  • One or more expected output files.
  • A "run.sh" script that runs dcd-client and compares its output to the expected output.
Clone this wiki locally