Advanced Features ================= ------------- embUnit Tools ------------- Embedded Unit is distributed with four tools to help by generating test template code. The following four tools are distributed: ======== ============ Tool Description ======== ============ tcuppa generate test template source file. bcuppa generate the main file, including main() tuma add a code to the code generated by tcuppa. buma add a code to the code generated by bcuppa. ======== ============ For more information read the README in /tools folder. --------------------- Advanced Test Runners --------------------- EmbUnit offers three more advanced result outputters as an additional static library, They can be taken into use by linking the library and replacing the main -function TextUIRunner and giving it the preferred outputter as reference. An example is below. .. code-block:: c :linenos: TextUIRunner_setOutputter(TextOutputter_outputter()); TextUIRunner_start(); TextUIRunner_runTest(shutterTest_tests()); TextUIRunner_end(); The outputter can be selected from one of the following: .. code-block:: c :linenos: TextUIRunner_setOutputter(TextOutputter_outputter()); TextUIRunner_setOutputter(CompilerOutputter_outputter()); TextUIRunner_setOutputter(XMLOutputter_outputter()); Below is an output of same tests formatted with each outputter: - Standard TextOutputter :: - shutterTest 1) OK testConstruct 2) OK testRequestUp 3) OK testRequestDown 4) NG testBuffer (shuttertest.c 168) exp 0 was 1 run 4 failures 1 - CompilerOutputter :: shuttertest.c 168: testBuffer: exp 0 was 1 XMLOutputter .. code-block:: xml testConstruct testRequestUp testRequestDown testBuffer shuttertest.c 168 exp 0 was 1 4 1