static void test_object (void) { QofBook *book = qof_book_new(); do_test ((NULL != book), "book null"); /* Test the global registration and lookup functions */ { do_test (!qof_object_register (NULL), "register NULL"); do_test (qof_object_register (&bus_obj), "register test object"); do_test (!qof_object_register (&bus_obj), "register test object again"); do_test (qof_object_lookup (TEST_MODULE_NAME) == &bus_obj, "lookup our installed object"); do_test (qof_object_lookup ("snm98sn snml say dyikh9y9ha") == NULL, "lookup non-existant object object"); do_test (!g_strcmp0 (qof_object_get_type_label (TEST_MODULE_NAME), _(TEST_MODULE_DESC)), "test description return"); } test_foreach (book, TEST_MODULE_NAME); test_printable (TEST_MODULE_NAME, (gpointer)1); }
int init_module(void) { START_TESTS("Session table"); INIT_CALL_END(init(), test_foreach(), end(), "Foreach"); END_TESTS; }
int main(int argc, char **argv) { (void)argc; (void)argv; test_null_alloc(); test_null_malloc(); test_null_free(); test_alloc_overflow(); test_alloc_underflow(); test_malloc_failure(); test_free_null_codec(); test_double_free(); test_foreach(); test_foreach_null_args(); test_decode_null_args(); test_encode_null_args(); test_resize_overflow(); test_limit_null_realloc(); test_limit_realloc_failure(); test_trim_null_realloc(); test_trim_realloc_failure(); test_use_defunct_decoder(); test_use_busy_decoder(); test_limit_null_encoder(); test_limit_decoder(); test_limit_overflow(); test_limit_overflow_no_realloc(); test_limit_between_two_resizes(); test_use_defunct_encoder(); test_use_busy_encoder(); test_resize_null_codec(); test_trim_null_codec(); test_trim_to_limit(); test_resize_realloc_failure(); test_clean_null_field(); test_clean_unknown_field(); test_clean_indexed_field_with_name(); test_clean_indexed_field_with_value(); test_clean_indexed_field_with_indexed_name(); test_strerror(); return (0); }
int main(int argc, char **argv) { test_stripe_array_1(); test_stripe_array_2(); test_stripe_split_1(); test_stripe_split_2(); test_stripe_xchg_bounds_1(); test_layer_1(); test_load_layer(); test_split_layers(); test_foreach(); return 0; }