Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation and testing fixes #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions src/seatest.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Typedefs
typedef void (*seatest_void_void)(void);
typedef void (*seatest_void_string)(char*);

/*
Declarations
*/
void (*seatest_simple_test_result)(int passed, char* reason, const char* function, unsigned int line);
void seatest_test_fixture_start(char* filepath);
void seatest_test_fixture_end( void );
void seatest_simple_test_result_log(int passed, char* reason, const char* function, unsigned int line);
/*
Declarations
*/
extern void (*seatest_simple_test_result)(int passed, char* reason, const char* function, unsigned int line);
void seatest_test_fixture_start(char* filepath);
void seatest_test_fixture_end( void );
void seatest_simple_test_result_log(int passed, char* reason, const char* function, unsigned int line);
void seatest_assert_true(int test, const char* function, unsigned int line);
void seatest_assert_false(int test, const char* function, unsigned int line);
void seatest_assert_int_equal(int expected, int actual, const char* function, unsigned int line);
Expand Down Expand Up @@ -73,13 +73,12 @@ Assert Macros
/*
Fixture / Test Management
*/

void fixture_setup(void (*setup)( void ));
void fixture_teardown(void (*teardown)( void ));
//#define run_test(test) do { if(seatest_should_run(__FILE__, #test)) {seatest_suite_setup(); seatest_setup(); test(); seatest_teardown(); seatest_suite_teardown(); seatest_run_test(__FILE__, #test); }} while (0)
#define run_test(test) do { seatest_test(__FILE__, #test, test);} while (0)
#define test_fixture_start() do { seatest_test_fixture_start(__FILE__); } while (0)
#define test_fixture_end() do { seatest_test_fixture_end();} while (0)

void fixture_setup(void (*setup)( void ));
void fixture_teardown(void (*teardown)( void ));
#define run_test(test) do { seatest_test(__FILE__, #test, test);} while (0)
#define test_fixture_start() do { seatest_test_fixture_start(__FILE__); } while (0)
#define test_fixture_end() do { seatest_test_fixture_end();} while (0)
void fixture_filter(char* filter);
void test_filter(char* filter);
void suite_teardown(seatest_void_void teardown);
Expand Down
2 changes: 1 addition & 1 deletion tests/seatest_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ void all_tests(void)

int main(int argc, char** argv)
{
return run_tests(all_tests) ? 0 : 1;
return run_tests(all_tests);
}