Lines Matching defs:suite

4  * running, result logging and clean up of a test suite, taking care
5 * of all the scaffolding. A test suite is a sequence of very targeted
9 * a test function and a logging identifier. A test suite is a suite_t
16 * other case (non-zero exit status, abnormal signal). The suite
17 * results are then aggregated and logged, and finally the test suite
23 * Testbot Test Case ([BEGIN]/[PASS]/[FAIL], and a test suite is
69 /* Test suite structure. */
120 suite_t *suite = (suite_t *)malloc(sizeof(suite_t));
121 die(suite == NULL, "malloc()");
123 suite->name = name;
124 suite->numoftests = numoftests;
125 suite->set_up = set_up;
126 suite->tests = tests;
127 suite->tear_down = tear_down;
128 return suite;
131 static void destroy_suite(suite_t *suite)
133 free(suite);
136 static void log_suite_info(suite_t *suite)
138 logr("[TEST] %s\n", suite->name);
139 logr("Number of tests: %d\n\n", suite->numoftests);
142 static void log_suite_results(suite_t *suite, int passed_tests)
144 results.numoftests += (uintmax_t)suite->numoftests;
170 static void run_test(suite_t *suite, unit_test_t *unit_test)
181 suite->set_up();
183 suite->tear_down();
220 static boolean_t child_test_passed(suite_t *suite,
228 run_test(suite, unit_test);
239 /* Run each test in a suite, and report the results. */
240 static int count_passed_suite_tests(suite_t *suite)
245 for (i = 0; i < suite->numoftests; i++) {
246 passed_tests += child_test_passed(suite,
247 &(suite->tests[i]));
311 suite_t *suite = create_suite(name, numoftests, set_up, tests,
313 log_suite_info(suite);
314 log_suite_results(suite, count_passed_suite_tests(suite));
316 destroy_suite(suite);
494 /* Arrays for test suite loops */