moved mk_sample_state() into util
This commit is contained in:
parent
a962eff7b4
commit
4c0d33693b
@ -31,7 +31,6 @@
|
|||||||
static void test_pass(TestState *);
|
static void test_pass(TestState *);
|
||||||
static void test_fail(TestState *);
|
static void test_fail(TestState *);
|
||||||
static void test_pend(TestState *);
|
static void test_pend(TestState *);
|
||||||
static void mk_sample_state(TestState *);
|
|
||||||
decl_test(always_passes);
|
decl_test(always_passes);
|
||||||
decl_test(always_fails);
|
decl_test(always_fails);
|
||||||
decl_test(always_pends);
|
decl_test(always_pends);
|
||||||
@ -127,16 +126,6 @@ test_pend(TestState *s)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
mk_sample_state(TestState *s)
|
|
||||||
{
|
|
||||||
memset(s, 0, sizeof(TestState));
|
|
||||||
s->passed = 1;
|
|
||||||
s->failed = 2;
|
|
||||||
s->pending = 3;
|
|
||||||
s->run = 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
decl_test(always_passes)
|
decl_test(always_passes)
|
||||||
{
|
{
|
||||||
return test_success;
|
return test_success;
|
||||||
|
10
test/util.c
10
test/util.c
@ -131,6 +131,16 @@ decl_test(compare_ptrs_test);
|
|||||||
|
|
||||||
// Public Functions
|
// Public Functions
|
||||||
|
|
||||||
|
void
|
||||||
|
mk_sample_state(TestState *s)
|
||||||
|
{
|
||||||
|
memset(s, 0, sizeof(TestState));
|
||||||
|
s->passed = 1;
|
||||||
|
s->failed = 2;
|
||||||
|
s->pending = 3;
|
||||||
|
s->run = 6;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
compare_states(
|
compare_states(
|
||||||
TestState *s,
|
TestState *s,
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
#define decl_test(n) static TestResult n(TestState *)
|
#define decl_test(n) static TestResult n(TestState *)
|
||||||
#define def_test(n, s) static TestResult n(TestState *s)
|
#define def_test(n, s) static TestResult n(TestState *s)
|
||||||
|
|
||||||
|
// initializes a sample TestState value
|
||||||
|
void mk_sample_state(TestState *);
|
||||||
|
|
||||||
// compares two TestState values
|
// compares two TestState values
|
||||||
extern void compare_states(
|
extern void compare_states(
|
||||||
TestState *, // the state we are *actually* updating ;)
|
TestState *, // the state we are *actually* updating ;)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user