Unit Test Engine

cmunit is a poor man's unit test engine.

Usage: cmunit [options] { project.cmp | solution.cms }

The engine compiles each function that has a unit_test specifier using given configuration (debug/release) into its own program and runs the compiled program. The number of succeeded and failed #assert statements in unit tests are counted and reported at the end of the unit testing session.

string.cm is an example of a source file containing a unit test function.

Long option Short option IDE command Description
--help -h Print help.
--verbose -v Be verbose.
--config=CONFIG -c=CONFIG Configuration combo box Build usig CONFIG configuration. CONFIG can be "debug" or "release".
--file=FILE -f=FILE File | Run Unit Tests Run only unit tests in the given source file.
--test=TEST -t=TEST Run only given unit test function.
--link-with-debug-runtime -d Build | Options | Link with debug runtime Link with debug version of the runtime library cmrt2xx(d).dll.
--link-using-ms-link -m Build | Options | Use Microsoft's link.exe as the linker Use Microsoft's link.exe as the linker. Link.exe must be found from the PATH. If not given uses LLVM's lld-link as the linker.

This is an example of a unit testing report.