static void cute_reporter_testcase_started(TestReporter *reporter, const char *name) { CuteMemo *memo = (CuteMemo *) reporter->memo; memo->error_count = reporter->failures + reporter->exceptions; memo->previous_error = 0; reporter_start(reporter, name); memo->printer("#starting %s\n", name); }
static void text_reporter_start_suite(TestReporter *reporter, const char *name, const int number_of_tests) { reporter_start(reporter, name); if (get_breadcrumb_depth((CgreenBreadcrumb *) reporter->breadcrumb) == 1) { printf("Running \"%s\" (%d tests)...\n", get_current_from_breadcrumb( (CgreenBreadcrumb *) reporter->breadcrumb), number_of_tests); fflush(stdout); } }
void run_specified_test_if_child(TestSuite *suite, TestReporter *reporter){ //figure out if we are a child process, and if so, use the test name provided by our parent char testName[256]; DWORD result = GetEnvironmentVariableA(CGREEN_TEST_TO_RUN,testName,sizeof(testName)); if (result) //we are a child process, only run the specified test { //May have to deal with some issues here. I don't call the function pointer for //reporter start and finish in order to avoid extraneous prints to the console, //but this may cause problems for other types of reporters. Not sure the //best solution for this. reporter_start(reporter, testName); //add breadcrumb without triggering output to console run_named_test_child(suite, testName, reporter); reporter_finish(reporter, suite->filename, suite->line, NULL); return; //never happens because we call stop inside run_named_test_child } }
static void text_reporter_start_test(TestReporter *reporter, const char *name) { reporter_start(reporter, name); }
static void cute_reporter_suite_started(TestReporter *reporter, const char *name, const int number_of_tests) { CuteMemo *memo = (CuteMemo *) reporter->memo; reporter_start(reporter, name); memo->printer("#beginning %s %d\n", name, number_of_tests); }
static void cdash_reporter_testcase_started(TestReporter *reporter, const char *name) { CdashMemo *memo = (CdashMemo *)reporter->memo; memo->teststarted = memo->timer(NULL); reporter_start(reporter, name); }
static void cdash_reporter_suite_started(TestReporter *reporter, const char *name, const int number_of_tests) { (void)number_of_tests; reporter_start(reporter, name); }
void reporter_start_suite(TestReporter *reporter, const char *name, const int count) { (void) count; reporter_start(reporter, name); }