X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Funit%2Fcore%2Fobject_test.c;h=d0a78656f1f7074966d8c9a75d90ce25ab4be887;hp=dec6d41c73a3f989e97fcd85c79e4a950908ab79;hb=967d9181f6329ca00b910c0c458b1c6b60f2a0d6;hpb=cf17313d62dcf1c10df0fe19287e354ede68206b diff --git a/t/unit/core/object_test.c b/t/unit/core/object_test.c index dec6d41..d0a7865 100644 --- a/t/unit/core/object_test.c +++ b/t/unit/core/object_test.c @@ -25,8 +25,12 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#if HAVE_CONFIG_H +# include "config.h" +#endif + #include "core/object.h" -#include "libsysdb_test.h" +#include "testutils.h" #include @@ -275,8 +279,7 @@ START_TEST(test_obj_ref) "%d time%s; expected: 0", destroy_noop_called == 1 ? "" : "2", destroy_noop_called); - /* test_obj_create already checks the ref_cnt == 1 case */ - obj->ref_cnt = 0; + obj->ref_cnt = 1; sdb_object_deref(obj); fail_unless(init_noop_called == 1, "after some sdb_object_{de,}ref(); object's init called %d times; " @@ -320,21 +323,16 @@ START_TEST(test_obj_cmp) } END_TEST -Suite * -core_object_suite(void) +TEST_MAIN("core::object") { - Suite *s = suite_create("core::object"); - TCase *tc; - - tc = tcase_create("core"); + TCase *tc = tcase_create("core"); tcase_add_test(tc, test_obj_create); tcase_add_test(tc, test_obj_wrapper); tcase_add_test(tc, test_obj_ref); tcase_add_test(tc, test_obj_cmp); - suite_add_tcase(s, tc); - - return s; -} /* core_object_suite */ + ADD_TCASE(tc); +} +TEST_MAIN_END /* vim: set tw=78 sw=4 ts=4 noexpandtab : */