From d6bbf5773591569cb997f385b51782ad0dc08881 Mon Sep 17 00:00:00 2001 From: tasn Date: Sun, 6 May 2012 14:18:44 +0000 Subject: [PATCH] Eo: Test getting data from class with no data. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@70816 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- tests/eo_test_general.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/eo_test_general.c b/tests/eo_test_general.c index eae168c..9f3fc21 100644 --- a/tests/eo_test_general.c +++ b/tests/eo_test_general.c @@ -23,7 +23,8 @@ START_TEST(eo_data_fetch) { eo_init(); - static const Eo_Class_Description class_desc = { + /* Usually should be const, not const only for the test... */ + static Eo_Class_Description class_desc = { "Simple2", EO_CLASS_TYPE_REGULAR, EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), @@ -45,6 +46,15 @@ START_TEST(eo_data_fetch) #endif eo_unref(obj); + class_desc.data_size = 0; + klass = eo_class_new(&class_desc, EO_BASE_CLASS, NULL); + fail_if(!klass); + + obj = eo_add(klass, NULL); + fail_if(!obj); + fail_if(eo_data_get(obj, klass)); + eo_unref(obj); + eo_shutdown(); } END_TEST -- 2.7.4