cleaned up comments
This commit is contained in:
parent
291d25927c
commit
01e01243dd
20
9unit.h
20
9unit.h
|
@ -21,15 +21,14 @@
|
||||||
|
|
||||||
// Types & Structs
|
// Types & Structs
|
||||||
|
|
||||||
// Tracks information about the tests being run.
|
|
||||||
typedef struct TestState TestState;
|
|
||||||
|
|
||||||
// Defines a log entry in a TestState struct
|
|
||||||
typedef struct TestLogEntry TestLogEntry;
|
|
||||||
|
|
||||||
// The following structures will typically be maintained by the
|
// The following structures will typically be maintained by the
|
||||||
// testing framework. You shouldn't need to concern yourself with
|
// testing framework. You shouldn't need to concern yourself with
|
||||||
// them.
|
// them.
|
||||||
|
|
||||||
|
typedef struct TestState TestState;
|
||||||
|
typedef struct TestLogEntry TestLogEntry;
|
||||||
|
|
||||||
|
// Tracks information about the tests being run.
|
||||||
struct TestState
|
struct TestState
|
||||||
{
|
{
|
||||||
int run; // number of tests run
|
int run; // number of tests run
|
||||||
|
@ -45,6 +44,7 @@ struct TestState
|
||||||
void (*report)(const char *); // prints a string immediately
|
void (*report)(const char *); // prints a string immediately
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Defines a log entry in a TestState struct
|
||||||
struct TestLogEntry
|
struct TestLogEntry
|
||||||
{
|
{
|
||||||
char *text; // the entry text
|
char *text; // the entry text
|
||||||
|
@ -74,11 +74,9 @@ extern void run_test_with(
|
||||||
void * // the value to pass in
|
void * // the value to pass in
|
||||||
);
|
);
|
||||||
|
|
||||||
// Runs multiple tests, displaying a summary at the end
|
// Creates an initial TestState, passes it to the supplied function,
|
||||||
extern void run_tests(
|
// and displays the resulting log and summary
|
||||||
// runs the tests and updates a provided TestState
|
extern void run_tests(void (*)(TestState *));
|
||||||
void (*)(TestState *)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Adds an entry to the log that is displayed after the tests have
|
// Adds an entry to the log that is displayed after the tests have
|
||||||
// completed
|
// completed
|
||||||
|
|
Loading…
Reference in New Issue
Block a user