SHTK_UNITTEST_ADD_TEST(3)
SHTK_UNITTEST_ADD_TEST(3) Library Functions Manual SHTK_UNITTEST_ADD_TEST(3)

shtk_unittest_add_testDefines a standalone test case

shtk_import unittest

shtk_unittest_add_test name

The shtk_unittest_add_test function registers the standalone test case given by name. A function named ‘<name>_test’ must be defined the call to shtk_unittest_add_test has been made.

The following piece of code illustrates the definition of a couple of test cases:

shtk_unittest_add_test first_scenario
first_scenario_test() {
    ... test code for the first test case ...
}

shtk_unittest_add_test second_scenario
second_scenario_test() {
    ... test code for the second test case ...
}

shtk(3), shtk_unittest(3)

shtk_unittest_add_test first appeared in shtk 1.6.

November 8, 2014 Debian