Eobj: Improved some tests a bit more.

SVN revision: 70138
This commit is contained in:
Tom Hacohen 2012-04-12 12:25:26 +00:00
parent ef994b8163
commit 3d11446968
2 changed files with 15 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#include "simple.h"
#include "comp.h"
#include "../eunit_tests.h"
EAPI Eobj_Op COMP_BASE_ID = 0;
@ -25,6 +26,9 @@ _constructor(Eobj *obj)
eobj_composite_object_attach(obj, simple);
eobj_event_callback_forwarder_add(simple, SIG_A_CHANGED, obj);
fail_if(eobj_composite_is(obj));
fail_if(!eobj_composite_is(simple));
eobj_unref(simple);
}

View File

@ -9,6 +9,16 @@
#include "class_simple.h"
START_TEST(eobj_simple)
{
eobj_init();
Eobj *obj = eobj_add(EOBJ_CLASS_BASE, NULL);
fail_if(obj);
eobj_shutdown();
}
END_TEST
START_TEST(eobj_op_errors)
{
eobj_init();
@ -28,4 +38,5 @@ END_TEST
void eobj_test_general(TCase *tc)
{
tcase_add_test(tc, eobj_op_errors);
tcase_add_test(tc, eobj_simple);
}