TEST(3) Library Functions Manual SourceForge Logo

NAME

testAPI for writing tests

LIBRARY

library “libtest”

SYNOPSIS

#include <test.h>
enum test_case_status
test_case_setup(test_case_state *state);
enum test_case_status
test_case_teardown(test_case_state state);
enum test_result
test_function(test_case_state state);
const char test_description [];
const char * test_tags [];
const char test_case_description [];
const char * test_case_tags [];

DESCRIPTION

The library “libtest” implements an API for writing tests.

Concepts

Tests are implemented using test functions, where each test function verifies a specific assertion about the system being tested. Test functions are associated with the following:
Test functions are further grouped into test cases, where a test case contains a logical group of assertions about the system under test. Test cases are associated the following:
One or more test cases would be linked with a test driver to form a test executable. The default test driver supplied allows the test cases and specific tests within the executable to be specified on the command line.

Scaffolding Generation

The make-test-scaffolding(1) script will generate the scaffolding needed to produce a test executable from object files containing symbols following its naming conventions.

SEE ALSO

make-test-scaffolding(1)

AUTHORS

The library “libtest” was written by Joseph Koshy <jkoshy@users.sourceforge.net>.
January 21, 2019 The Elftoolchain Project