check
Description:
Check is a unit testing framework for C. It features a simple interface for defining unit tests, putting little in the way of the developer. Tests are run in a separate address space, so both assertion failures and code errors that cause segmentation faults or other signals can be caught. Test results are reportable in the following: Subunit, TAP, XML, and a generic logging format.
- Home: https://libcheck.github.io/check/
- C-Documentation: https://libcheck.github.io/check/doc/doxygen/html/check_8h.html
- Devhelp-Package download
Content:
Namespaces:
- Check
- SRunner - Holds state for a running of a test suite
- Suite - Type for a test suite
- TCase - Type for a test case
- TestResult - Opaque type for a test failure
- ForkStatus - Enum describing the current fork usage.
- PrintOutput
- ResultContext - Enum representing the types of contexts for a test
- TestResultValue - Enum describing the possible results of a test
- public delegate void SFun ()
Type for a setup/teardown function
- public delegate void TFun (int arg)
Type for a test function
- public void abort ()
Unconditionally fail the test
- public void abort_msg (...)
Unconditionally fail the test; print a message
- public void assert (bool expression)
Fail the test if expression is false
- public void assert_int_eq (int X, int Y)
Check two signed integers to determine if X==Y
- public void assert_int_ge (int X, int Y)
Check two signed integers to determine if X>=Y
- public void assert_int_gt (int X, int Y)
Check two signed integers to determine if X>Y
- public void assert_int_le (int X, int Y)
Check two signed integers to determine if X<=Y
- public void assert_int_lt (int X, int Y)
Check two signed integers to determine if X<Y
- public void assert_int_ne (int X, int Y)
Check two signed integers to determine if X!=Y
- public void assert_msg (bool expression, ...)
Fail the test if the expression is false; print message on failure
- public void assert_ptr_eq (void* X, void* Y)
Check if two pointers are equal.
- public void assert_ptr_ne (void* X, void* Y)
Check if two pointers are not.
- public void assert_str_eq (string X, string Y)
Check two strings to determine if 0==strcmp(X,Y)
- public void assert_str_ge (string X, string Y)
Check two strings to determine if 0>=strcmp(X,Y) (e.g. strcmp(X,Y)<= 0)
- public void assert_str_gt (string X, string Y)
Check two strings to determine if 0<strcmp(X,Y) (e.g. strcmp(X,Y)>0)
- public void assert_str_le (string X, string Y)
Check two strings to determine if 0<=strcmp(X,Y) (e.g. strcmp(X,Y)>= 0)
- public void assert_str_lt (string X, string Y)
Check two strings to determine if 0<strcmp(X,Y), (e.g. strcmp(X,Y)> 0)
- public void assert_str_ne (string X, string Y)
Check two strings to determine if 0!=strcmp(X,Y)
- public void assert_uint_eq (uint X, uint Y)
Check two unsigned integers to determine if X==Y
- public void assert_uint_ge (uint X, uint Y)
Check two unsigned integers to determine if X>=Y
- public void assert_uint_gt (uint X, uint Y)
Check two unsigned integers to determine if X>Y
- public void assert_uint_le (uint X, uint Y)
Check two unsigned integers to determine if X<=Y
- public void assert_uint_lt (uint X, uint Y)
Check two unsigned integers to determine if X<Y
- public void assert_uint_ne (uint X, uint Y)
Check two unsigned integers to determine if X!=Y
- public pid_t check_fork ()
Invoke fork() during a test and assign the child to the same process group that the rest of the test case uses.
- public void check_waitpid_and_exit (pid_t pid)
Wait for the pid and exit.
- public void mark_point ()
Mark the last point reached in a unit test.
- public void tcase_fn_start (string fname, string file, int line)
- public inline void tcase_start_function ()