jeyzu pushed a commit to branch master.
commit f71b40db2f5692b28c3329a419b1d3e3501af633
Author: Jérémy Zurcher <[email protected]>
Date: Tue May 7 23:40:53 2013 +0200
eo ptr ind tests: guard numerous fail_if, lesson learned from
eina_list_shuffle
---
src/tests/eo/suite/eo_test_general.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/tests/eo/suite/eo_test_general.c
b/src/tests/eo/suite/eo_test_general.c
index 3361d47..4118bca 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -870,21 +870,26 @@ START_TEST(eo_pointers_indirection)
for ( obj_id = 0; obj_id < NB_OBJS; obj_id++)
{
objs[obj_id] = eo_add(klass, NULL);
- fail_if(!objs[obj_id]);
- fail_if(!eo_isa(objs[obj_id], klass));
+ if(!objs[obj_id])
+ fail_if(!objs[obj_id]);
+ if(!eo_isa(objs[obj_id], klass))
+ fail_if(!eo_isa(objs[obj_id], klass));
}
/* Deletion of half of the objects */
for ( obj_id = 0; obj_id < NB_OBJS; obj_id+=2)
{
eo_unref(objs[obj_id]);
- fail_if(eo_isa(objs[obj_id], klass));
+ if(eo_isa(objs[obj_id], klass))
+ fail_if(eo_isa(objs[obj_id], klass));
}
/* Creation of half of the objects */
for ( obj_id = 0; obj_id < NB_OBJS; obj_id+=2)
{
objs[obj_id] = eo_add(klass, NULL);
- fail_if(!objs[obj_id]);
- fail_if(!eo_isa(objs[obj_id], klass));
+ if(!objs[obj_id])
+ fail_if(!objs[obj_id]);
+ if(!eo_isa(objs[obj_id], klass))
+ fail_if(!eo_isa(objs[obj_id], klass));
}
/* Deletion of all the objects */
for ( obj_id = 0; obj_id < NB_OBJS; obj_id++)
--
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may