Exposed run_all to allow user-defined entry points

This commit is contained in:
Snaipe 2015-02-06 12:46:38 +01:00
parent 3ac79db604
commit 09d186ab11
2 changed files with 4 additions and 2 deletions

View file

@ -65,4 +65,6 @@ struct criterion_test {
}; \
TEST_PROTOTYPE_(Category, Name)
int criterion_run_all_tests(void);
#endif /* !CRITERION_H_ */

View file

@ -163,7 +163,7 @@ static void run_test(struct criterion_global_stats *stats, struct criterion_test
}
// TODO: disable & change tests at runtime
int run_all(void) {
int criterion_run_all_tests(void) {
report(PRE_EVERYTHING, NULL);
smart struct test_set *set = read_all_tests();
smart struct criterion_global_stats *stats = stats_init();
@ -176,5 +176,5 @@ int run_all(void) {
}
int main(void) {
return run_all();
return criterion_run_all_tests();
}