void eventd_tests_unit_eventd_protocol_suite_generator(void) { GTestSuite *suite; suite = g_test_create_suite("LibeventdEvp generator test suite"); g_test_suite_add(suite, g_test_create_case("evp_generate_event()", sizeof(GeneratorData), NULL, _init_data, _test_evp_generate_event, _clean_data)); g_test_suite_add(suite, g_test_create_case("evp_generate_event(data)", sizeof(GeneratorData), NULL, _init_data_with_data, _test_evp_generate_event, _clean_data)); g_test_suite_add(suite, g_test_create_case("evp_generate_bye()", sizeof(GeneratorData), NULL, _init_data, _test_evp_generate_bye, _clean_data)); g_test_suite_add(suite, g_test_create_case("evp_generate_bye(message)", sizeof(GeneratorData), GINT_TO_POINTER(TRUE), _init_data, _test_evp_generate_bye, _clean_data)); g_test_suite_add_suite(g_test_get_root(), suite); }
GTestSuite * test_synchronous_create_test_suite (void) { GTestSuite *ts = NULL; ts = g_test_create_suite ("synchronous"); g_test_suite_add(ts, g_test_create_case ("synchronous layout", 0, NULL, NULL, test_synchronous_layout, NULL) ); return ts; }
void eventd_tests_unit_eventd_event_suite_setters(void) { GTestSuite *suite; suite = g_test_create_suite("EventdEvent setters test suite"); g_test_suite_add(suite, g_test_create_case("new(category, name)", sizeof(SettersData), NULL, NULL, _test_new_good_good, NULL)); g_test_suite_add(suite, g_test_create_case("new(NULL, name)", sizeof(SettersData), NULL, NULL, _test_new_null_good, NULL)); g_test_suite_add(suite, g_test_create_case("new(category, NULL)", sizeof(SettersData), NULL, NULL, _test_new_good_null, NULL)); g_test_suite_add(suite, g_test_create_case("add_data(event, name, data)", sizeof(SettersData), NULL, _init_data, _test_add_data_notnull_good_good, _clean_data)); g_test_suite_add(suite, g_test_create_case("add_data(NULL,)", sizeof(SettersData), NULL, NULL, _test_add_data_null_good_good, NULL)); g_test_suite_add(suite, g_test_create_case("add_data(event, NULL,)", sizeof(SettersData), NULL, _init_data, _test_add_data_notnull_bad_good, _clean_data)); g_test_suite_add(suite, g_test_create_case("add_data(event, NULL, NULL)", sizeof(SettersData), NULL, _init_data, _test_add_data_notnull_good_bad, _clean_data)); g_test_suite_add_suite(g_test_get_root(), suite); }
GTestCase * folks_test_case_add_test_helper (FolksTestCase *self, const gchar *name, FolksTestCaseTestMethod test, void *test_target) { FolksTestCaseWeakMethod *wm; g_return_if_fail (self == (FolksTestCase *) test_target); /* This will never be freed, so make sure not to hold references. */ wm = g_new0 (FolksTestCaseWeakMethod, 1); wm->self = self; wm->test = test; g_object_add_weak_pointer (G_OBJECT (self), &wm->self); return g_test_create_case (name, 0, wm, folks_test_case_weak_method_setup, folks_test_case_weak_method_test, folks_test_case_weak_method_teardown); }
GTestSuite* test_timings_create_test_suite (void) { GTestSuite* ts = NULL; ts = g_test_create_suite ("timings"); g_test_suite_add (ts, g_test_create_case ("can create", 0, NULL, NULL, test_timings_new, NULL)); g_test_suite_add (ts, g_test_create_case ("can start", 0, NULL, NULL, test_timings_start, NULL)); g_test_suite_add (ts, g_test_create_case ("can extend", 0, NULL, NULL, test_timings_extend, NULL)); g_test_suite_add (ts, g_test_create_case ("can pause", 0, NULL, NULL, test_timings_pause, NULL)); g_test_suite_add (ts, g_test_create_case ("can continue", 0, NULL, NULL, test_timings_continue, NULL)); g_test_suite_add (ts, g_test_create_case ("can intercept pause if paused", 0, NULL, NULL, test_timings_intercept_pause, NULL)); g_test_suite_add (ts, g_test_create_case ( "can intercept continue if running", 0, NULL, NULL, test_timings_intercept_continue, NULL)); g_test_suite_add (ts, g_test_create_case ( "can intercept start if started", 0, NULL, NULL, test_timings_intercept_start, NULL)); g_test_suite_add (ts, g_test_create_case ( "can intercept stop if stopped", 0, NULL, NULL, test_timings_intercept_stop, NULL)); return ts; }