Eobj: Improved some tests a bit more.
authortasn <tasn>
Thu, 12 Apr 2012 12:25:26 +0000 (12:25 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Apr 2012 12:25:26 +0000 (12:25 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@70138 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

examples/composite_objects/comp.c
tests/eobj_test_general.c

index 8fbedd9..a688d20 100644 (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);
 }
 
index 418e184..2f89e29 100644 (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);
 }