Eolian: fix test.
authorDaniel Zaoui <daniel.zaoui@samsung.com>
Wed, 28 May 2014 10:51:49 +0000 (13:51 +0300)
committerDaniel Zaoui <daniel.zaoui@samsung.com>
Thu, 29 May 2014 06:58:27 +0000 (09:58 +0300)
Constructor has to be defined in the constructors section and not as a
method.

src/tests/eolian/data/base.eo
src/tests/eolian/eolian_parsing.c

index a252140ebbb67a12a713b4acccfdbca11628a27e..ca5d2aa9243828d84f988c9c1d466dcefa80bcc2 100644 (file)
@@ -1,7 +1,9 @@
 class Base {
-   methods {
+   constructors {
       constructor {
       }
+   }
+   methods {
       destructor {
       }
    }
index a60eaba2828deb79cfd18c254817922a5af0bede..615fc65cc4299c7de2c07449e18ab202177ae02f 100644 (file)
@@ -202,7 +202,7 @@ START_TEST(eolian_ctor_dtor)
    fail_if(strcmp(impl_func, "destructor"));
 
    /* Custom ctors/dtors */
-   fail_if(!eolian_class_function_find_by_name(base, "constructor", EOLIAN_METHOD));
+   fail_if(!eolian_class_function_find_by_name(base, "constructor", EOLIAN_CTOR));
    fail_if(!eolian_class_function_find_by_name(base, "destructor", EOLIAN_METHOD));
    fail_if(!eolian_class_function_find_by_name(class, "custom_constructor_1", EOLIAN_CTOR));
    fail_if(!eolian_class_function_find_by_name(class, "custom_constructor_2", EOLIAN_CTOR));