File src/stic.c changed (mode: 100644) (index 8d854d9..9da27d3) |
... |
... |
static stic_void_void stic_fixture_setup = 0; |
89 |
89 |
static stic_void_void stic_fixture_teardown = 0; |
static stic_void_void stic_fixture_teardown = 0; |
90 |
90 |
|
|
91 |
91 |
const char *stic_current_test_name; |
const char *stic_current_test_name; |
92 |
|
stic_void_void stic_current_test; |
|
|
92 |
|
stic_test stic_current_test; |
93 |
93 |
const char *stic_suite_name; |
const char *stic_suite_name; |
94 |
94 |
|
|
95 |
95 |
void (*stic_simple_test_result)(int passed, char* reason, const char* function, const char file[], unsigned int line) = stic_simple_test_result_log; |
void (*stic_simple_test_result)(int passed, char* reason, const char* function, const char file[], unsigned int line) = stic_simple_test_result_log; |
|
... |
... |
static int test_had_output(void) |
191 |
191 |
|
|
192 |
192 |
void stic_simple_test_result_log(int passed, char* reason, const char* function, const char file[], unsigned int line) |
void stic_simple_test_result_log(int passed, char* reason, const char* function, const char file[], unsigned int line) |
193 |
193 |
{ |
{ |
194 |
|
static stic_void_void last_test; |
|
195 |
|
static stic_void_void last_failed_test; |
|
|
194 |
|
static stic_test last_test; |
|
195 |
|
static stic_test last_failed_test; |
196 |
196 |
|
|
197 |
197 |
const char *test_name = (stic_current_test == last_test) ? "" : stic_current_test_name; |
const char *test_name = (stic_current_test == last_test) ? "" : stic_current_test_name; |
198 |
198 |
|
|
File src/stic.h changed (mode: 100644) (index b6e55fa..7a81cd9) |
18 |
18 |
|
|
19 |
19 |
/* Widely used function types. */ |
/* Widely used function types. */ |
20 |
20 |
|
|
|
21 |
|
typedef void (*stic_test)(void); |
21 |
22 |
typedef void (*stic_void_void)(void); |
typedef void (*stic_void_void)(void); |
22 |
23 |
typedef void (*stic_void_string)(char[]); |
typedef void (*stic_void_string)(char[]); |
23 |
24 |
|
|
|
... |
... |
struct stic_test_data |
147 |
148 |
{ |
{ |
148 |
149 |
const char *const n; |
const char *const n; |
149 |
150 |
const char *const f; |
const char *const f; |
150 |
|
stic_void_void t; |
|
|
151 |
|
stic_test t; |
151 |
152 |
int (*const p)(void); |
int (*const p)(void); |
152 |
153 |
}; |
}; |
153 |
154 |
|
|
|
... |
... |
static const char * stic_get_fixture_name(void) |
303 |
304 |
static void stic_fixture(void) |
static void stic_fixture(void) |
304 |
305 |
{ |
{ |
305 |
306 |
extern const char *stic_current_test_name; |
extern const char *stic_current_test_name; |
306 |
|
extern stic_void_void stic_current_test; |
|
|
307 |
|
extern stic_test stic_current_test; |
307 |
308 |
|
|
308 |
309 |
size_t i; |
size_t i; |
309 |
310 |
int has_any_tests = 0; |
int has_any_tests = 0; |