Skip to content
Martin Ukrop edited this page Jul 9, 2013 · 5 revisions

EACirc has a built-in set of self-test used for development. The tests use CATCH testing framework (more info on page describing used third-party libraries). All tests and resources used for testing are located in folder self_tests.

When in testing mode, EACirc uses dedicated config file saved as string in the main test header file. If tests require special configuration, they modify this config file as necessary just before run.

Tests suites try to use all available projects. To include new project in testing, implement static function testingConfiguration() that provides testing configuration as string. Then add project to getTestingConfiguration() in IProject and finally add project constant to TestConfigurator constructor.

Enabling testing

Testing mode is enabled by command line argument -test. After identifying directive for testing, cli arguments parsing is discontinued and CATCH is called with the rest of the arguments (thus, if you want to enable logging, do it before calling testing). The full account of arguments for CATCH can be found in CATCH's wiki page, some useful bits are summarized below.

  • -h -? --help
    Prints basic help for CATCH.
  • -t --test [ ...]
    Each either fully specifies a test case or is a pattern containing wildcards (*) to match a set of test cases. Excludes are supported using "exclude:" or "~" before test name. may have to be enclosed in quotes in some environments to be understood correctly
  • -l --list
    Print the list of all available test and reporters.
Clone this wiki locally