make-test-scaffolding —
generate scaffolding for tests
make-test-scaffolding |
[-o
output_file]
test_object ... |
The
make-test-scaffolding utility takes as input
object files containing symbols following its naming convention and generates
the scaffolding needed to assemble a test executable.
The
make-test-scaffolding utility expects symbols
to be named using the following conventions:
- Test case descriptions are named using the
tc_description_
prefix, followed by the name of
the test case. For example, the symbol
tc_description_helloworld would name the
description of a test case named “helloworld”.
- Test set up functions are named using a
tc_setup_
prefix, followed by the name of a test
case. For example, the function
tc_setup_helloworld() would name the set up
function for a test case named “helloworld”.
- Test tear down functions are named using a
tc_teardown_
prefix, followed by the name of a
test case. For example, the function
tc_teardown_helloworld() would name the tear
down function for a test case named “helloworld”.
- Tags for test cases are named using symbols with a
tc_tags_
prefix, followed by the name of their
test case.
- Test functions are named using a
tf_
prefix, followed by the name for their
containing test case and a disambiguating suffix. For example, the two
test functions tf_helloworld_sayhello() and
tf_helloworld_saygoodbye() would be
associated with the test case named “helloworld”.
A test function that is not associated with a test case will be added to a
special test case named “default”.
- Tags for test functions are named using symbols with a
tf_tags_
prefix, followed by the name of their
test case.
The
make-test-scaffolding utility will generate a C
source file containing the appropriate
struct
test_descriptor and
struct
test_case_descriptor structures for use by a test driver.
test(3),
test_runner(3)
The
make-test-scaffolding utility was written by
Joseph Koshy
<
jkoshy@users.sourceforge.net>.