np.h File Reference

NovaProva C API. More...


Defines

#define NP_PASS   __np_pass(__FILE__, __LINE__)
 Causes the running test to terminate immediately with a PASS result.
#define NP_FAIL   __np_fail(__FILE__, __LINE__)
 Causes the running test to terminate immediately with a FAIL result.
#define NP_NOTAPPLICABLE   __np_notapplicable(__FILE__, __LINE__)
 Causes the running test to terminate immediately with a NOTAPPLICABLE result.
#define NP_ASSERT(cc)
 Test that a given boolean condition is true, otherwise FAIL the test.
#define NP_ASSERT_TRUE(a)
 Test that a given boolean condition is true, otherwise FAIL the test.
#define NP_ASSERT_FALSE(a)
 Test that a given boolean condition is false, otherwise FAIL the test.
#define NP_ASSERT_EQUAL(a, b)
 Test that two signed integers are equal, otherwise FAIL the test.
#define NP_ASSERT_NOT_EQUAL(a, b)
 Test that two signed integers are not equal, otherwise FAIL the test.
#define NP_ASSERT_PTR_EQUAL(a, b)
 Test that two pointers are equal, otherwise FAIL the test.
#define NP_ASSERT_PTR_NOT_EQUAL(a, b)
 Test that two pointers are not equal, otherwise FAIL the test.
#define NP_ASSERT_NULL(a)
 Test that a pointer is NULL, otherwise FAIL the test.
#define NP_ASSERT_NOT_NULL(a)
 Test that a pointer is not NULL, otherwise FAIL the test.
#define NP_ASSERT_STR_EQUAL(a, b)
 Test that two strings are equal, otherwise FAIL the test.
#define NP_ASSERT_STR_NOT_EQUAL(a, b)
 Test that two strings are not equal, otherwise FAIL the test.
#define NP_PARAMETER(nm, vals)
 Statically define a test parameter and its values.

Functions

np_runner_t * np_init (void)
 Initialise the NovaProva library.
void np_list_tests (np_runner_t *, np_plan_t *)
 Print the names of the tests in the plan to stdout.
void np_set_concurrency (np_runner_t *, int)
 Set the limit on test job parallelism.
void np_set_output_format (np_runner_t *, const char *)
 Set the output format.
int np_run_tests (np_runner_t *, np_plan_t *)
 Run all the tests in the plan.
void np_done (np_runner_t *)
 Shut down the NovaProva library.
np_plan_t * np_plan_new (void)
 Create a new plan object.
bool np_plan_add_specs (np_plan_t *, int nspec, const char **spec)
 Add test specifications to a plan object.
void np_plan_delete (np_plan_t *)
 Destroys a plan object.
void np_syslog_fail (const char *re)
 Set up to FAIL the test on syslog messages matching a regexp.
void np_syslog_ignore (const char *re)
 Set up to ignore syslog messages matching a regexp.
void np_syslog_match (const char *re, int tag)
 Set up to count syslog messages matching a regexp.
unsigned int np_syslog_count (int tag)
 Return the number of syslog matches for the given tag.


Detailed Description

Author:
Greg Banks <gnb@fastmail.fm>

Generated on Wed Aug 15 11:33:42 2012 for NovaProva by  doxygen 1.5.8