tasn pushed a commit to branch master.


commit 8780da1fbdb4e06a12508bcc86023ee2d1b4e30a
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Mar 1 19:06:05 2016 +0000

    Eo tests: Update tests according to the new syntax
    These tests don't use eolian, but are plain Eo, so they need manual
 src/tests/eo/access/access_inherit.h               |   2 +-
 src/tests/eo/access/access_simple.h                |   2 +-
 .../composite_objects/composite_objects_simple.h   | 132 ++++++++++-----------
 src/tests/eo/constructors/constructors_mixin.h     |   2 +-
 src/tests/eo/constructors/constructors_simple.h    |   8 +-
 .../function_overrides_inherit2.h                  |   4 +-
 .../function_overrides/function_overrides_simple.h |   8 +-
 src/tests/eo/interface/interface_interface.h       |   2 +-
 src/tests/eo/interface/interface_interface2.h      |   2 +-
 src/tests/eo/interface/interface_simple.h          |   8 +-
 src/tests/eo/mixin/mixin_mixin.h                   |   2 +-
 src/tests/eo/mixin/mixin_simple.h                  |   8 +-
 src/tests/eo/signals/signals_simple.h              |   2 +-
 src/tests/eo/suite/eo_test_class_simple.h          |  16 +--
 src/tests/eo/suite/eo_test_general.c               |  36 ------
 15 files changed, 99 insertions(+), 135 deletions(-)

diff --git a/src/tests/eo/access/access_inherit.h 
index 0c15436..c1535f1 100644
--- a/src/tests/eo/access/access_inherit.h
+++ b/src/tests/eo/access/access_inherit.h
@@ -1,7 +1,7 @@
 #ifndef INHERIT_H
 #define INHERIT_H
-EAPI void inherit_prot_print(void);
+EAPI void inherit_prot_print(Eo *obj);
 #define INHERIT_CLASS inherit_class_get()
 const Eo_Class *inherit_class_get(void);
diff --git a/src/tests/eo/access/access_simple.h 
index 3c92d21..e2e1031 100644
--- a/src/tests/eo/access/access_simple.h
+++ b/src/tests/eo/access/access_simple.h
@@ -1,7 +1,7 @@
 #ifndef SIMPLE_H
 #define SIMPLE_H
-EAPI void simple_a_set(int a);
+EAPI void simple_a_set(Eo *obj, int a);
 typedef struct
diff --git a/src/tests/eo/composite_objects/composite_objects_simple.h 
index 55b8f9e..4de0ac4 100644
--- a/src/tests/eo/composite_objects/composite_objects_simple.h
+++ b/src/tests/eo/composite_objects/composite_objects_simple.h
@@ -6,73 +6,73 @@ typedef struct
    int a;
 } Simple_Public_Data;
-EAPI void simple_a_set(int a);
-EAPI int simple_a_get(void);
+EAPI void simple_a_set(Eo *obj, int a);
+EAPI int simple_a_get(Eo *obj);
-EAPI void simple_a_set1(int a);
-EAPI void simple_a_set2(int a);
-EAPI void simple_a_set3(int a);
-EAPI void simple_a_set4(int a);
-EAPI void simple_a_set5(int a);
-EAPI void simple_a_set6(int a);
-EAPI void simple_a_set7(int a);
-EAPI void simple_a_set8(int a);
-EAPI void simple_a_set9(int a);
-EAPI void simple_a_set10(int a);
-EAPI void simple_a_set11(int a);
-EAPI void simple_a_set12(int a);
-EAPI void simple_a_set13(int a);
-EAPI void simple_a_set14(int a);
-EAPI void simple_a_set15(int a);
-EAPI void simple_a_set16(int a);
-EAPI void simple_a_set17(int a);
-EAPI void simple_a_set18(int a);
-EAPI void simple_a_set19(int a);
-EAPI void simple_a_set20(int a);
-EAPI void simple_a_set21(int a);
-EAPI void simple_a_set22(int a);
-EAPI void simple_a_set23(int a);
-EAPI void simple_a_set24(int a);
-EAPI void simple_a_set25(int a);
-EAPI void simple_a_set26(int a);
-EAPI void simple_a_set27(int a);
-EAPI void simple_a_set28(int a);
-EAPI void simple_a_set29(int a);
-EAPI void simple_a_set30(int a);
-EAPI void simple_a_set31(int a);
-EAPI void simple_a_set32(int a);
-EAPI void simple_a_get1(int a);
-EAPI void simple_a_get2(int a);
-EAPI void simple_a_get3(int a);
-EAPI void simple_a_get4(int a);
-EAPI void simple_a_get5(int a);
-EAPI void simple_a_get6(int a);
-EAPI void simple_a_get7(int a);
-EAPI void simple_a_get8(int a);
-EAPI void simple_a_get9(int a);
-EAPI void simple_a_get10(int a);
-EAPI void simple_a_get11(int a);
-EAPI void simple_a_get12(int a);
-EAPI void simple_a_get13(int a);
-EAPI void simple_a_get14(int a);
-EAPI void simple_a_get15(int a);
-EAPI void simple_a_get16(int a);
-EAPI void simple_a_get17(int a);
-EAPI void simple_a_get18(int a);
-EAPI void simple_a_get19(int a);
-EAPI void simple_a_get20(int a);
-EAPI void simple_a_get21(int a);
-EAPI void simple_a_get22(int a);
-EAPI void simple_a_get23(int a);
-EAPI void simple_a_get24(int a);
-EAPI void simple_a_get25(int a);
-EAPI void simple_a_get26(int a);
-EAPI void simple_a_get27(int a);
-EAPI void simple_a_get28(int a);
-EAPI void simple_a_get29(int a);
-EAPI void simple_a_get30(int a);
-EAPI void simple_a_get31(int a);
-EAPI void simple_a_get32(int a);
+EAPI void simple_a_set1(Eo *obj, int a);
+EAPI void simple_a_set2(Eo *obj, int a);
+EAPI void simple_a_set3(Eo *obj, int a);
+EAPI void simple_a_set4(Eo *obj, int a);
+EAPI void simple_a_set5(Eo *obj, int a);
+EAPI void simple_a_set6(Eo *obj, int a);
+EAPI void simple_a_set7(Eo *obj, int a);
+EAPI void simple_a_set8(Eo *obj, int a);
+EAPI void simple_a_set9(Eo *obj, int a);
+EAPI void simple_a_set10(Eo *obj, int a);
+EAPI void simple_a_set11(Eo *obj, int a);
+EAPI void simple_a_set12(Eo *obj, int a);
+EAPI void simple_a_set13(Eo *obj, int a);
+EAPI void simple_a_set14(Eo *obj, int a);
+EAPI void simple_a_set15(Eo *obj, int a);
+EAPI void simple_a_set16(Eo *obj, int a);
+EAPI void simple_a_set17(Eo *obj, int a);
+EAPI void simple_a_set18(Eo *obj, int a);
+EAPI void simple_a_set19(Eo *obj, int a);
+EAPI void simple_a_set20(Eo *obj, int a);
+EAPI void simple_a_set21(Eo *obj, int a);
+EAPI void simple_a_set22(Eo *obj, int a);
+EAPI void simple_a_set23(Eo *obj, int a);
+EAPI void simple_a_set24(Eo *obj, int a);
+EAPI void simple_a_set25(Eo *obj, int a);
+EAPI void simple_a_set26(Eo *obj, int a);
+EAPI void simple_a_set27(Eo *obj, int a);
+EAPI void simple_a_set28(Eo *obj, int a);
+EAPI void simple_a_set29(Eo *obj, int a);
+EAPI void simple_a_set30(Eo *obj, int a);
+EAPI void simple_a_set31(Eo *obj, int a);
+EAPI void simple_a_set32(Eo *obj, int a);
+EAPI void simple_a_get1(Eo *obj, int a);
+EAPI void simple_a_get2(Eo *obj, int a);
+EAPI void simple_a_get3(Eo *obj, int a);
+EAPI void simple_a_get4(Eo *obj, int a);
+EAPI void simple_a_get5(Eo *obj, int a);
+EAPI void simple_a_get6(Eo *obj, int a);
+EAPI void simple_a_get7(Eo *obj, int a);
+EAPI void simple_a_get8(Eo *obj, int a);
+EAPI void simple_a_get9(Eo *obj, int a);
+EAPI void simple_a_get10(Eo *obj, int a);
+EAPI void simple_a_get11(Eo *obj, int a);
+EAPI void simple_a_get12(Eo *obj, int a);
+EAPI void simple_a_get13(Eo *obj, int a);
+EAPI void simple_a_get14(Eo *obj, int a);
+EAPI void simple_a_get15(Eo *obj, int a);
+EAPI void simple_a_get16(Eo *obj, int a);
+EAPI void simple_a_get17(Eo *obj, int a);
+EAPI void simple_a_get18(Eo *obj, int a);
+EAPI void simple_a_get19(Eo *obj, int a);
+EAPI void simple_a_get20(Eo *obj, int a);
+EAPI void simple_a_get21(Eo *obj, int a);
+EAPI void simple_a_get22(Eo *obj, int a);
+EAPI void simple_a_get23(Eo *obj, int a);
+EAPI void simple_a_get24(Eo *obj, int a);
+EAPI void simple_a_get25(Eo *obj, int a);
+EAPI void simple_a_get26(Eo *obj, int a);
+EAPI void simple_a_get27(Eo *obj, int a);
+EAPI void simple_a_get28(Eo *obj, int a);
+EAPI void simple_a_get29(Eo *obj, int a);
+EAPI void simple_a_get30(Eo *obj, int a);
+EAPI void simple_a_get31(Eo *obj, int a);
+EAPI void simple_a_get32(Eo *obj, int a);
 extern const Eo_Event_Description _EV_A_CHANGED;
 #define EV_A_CHANGED (&(_EV_A_CHANGED))
diff --git a/src/tests/eo/constructors/constructors_mixin.h 
index ebf923f..d640108 100644
--- a/src/tests/eo/constructors/constructors_mixin.h
+++ b/src/tests/eo/constructors/constructors_mixin.h
@@ -1,7 +1,7 @@
 #ifndef MIXIN_H
 #define MIXIN_H
-EAPI void mixin_add_and_print(int x);
+EAPI void mixin_add_and_print(Eo *obj, int x);
 #define MIXIN_CLASS mixin_class_get()
 const Eo_Class *mixin_class_get(void);
diff --git a/src/tests/eo/constructors/constructors_simple.h 
index c4b3d7b..e10cde5 100644
--- a/src/tests/eo/constructors/constructors_simple.h
+++ b/src/tests/eo/constructors/constructors_simple.h
@@ -1,10 +1,10 @@
 #ifndef SIMPLE_H
 #define SIMPLE_H
-EAPI void simple_a_set(int a);
-EAPI int simple_a_get(void);
-EAPI void simple_b_set(int b);
-EAPI int simple_b_get(void);
+EAPI void simple_a_set(Eo *obj, int a);
+EAPI int simple_a_get(Eo *obj);
+EAPI void simple_b_set(Eo *obj, int b);
+EAPI int simple_b_get(Eo *obj);
 #define SIMPLE_CLASS simple_class_get()
 const Eo_Class *simple_class_get(void);
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit2.h 
index 48be203..ad7d800 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit2.h
+++ b/src/tests/eo/function_overrides/function_overrides_inherit2.h
@@ -1,8 +1,8 @@
 #ifndef INHERIT2_H
 #define INHERIT2_H
-EAPI Eina_Bool inherit2_print(void);
-EAPI Eina_Bool inherit2_print2(void);
+EAPI Eina_Bool inherit2_print(Eo *obj);
+EAPI Eina_Bool inherit2_print2(Eo *obj);
 #define INHERIT2_CLASS inherit2_class_get()
 const Eo_Class *inherit2_class_get(void);
diff --git a/src/tests/eo/function_overrides/function_overrides_simple.h 
index e473968..3c54d74 100644
--- a/src/tests/eo/function_overrides/function_overrides_simple.h
+++ b/src/tests/eo/function_overrides/function_overrides_simple.h
@@ -6,10 +6,10 @@ typedef struct
    int a;
 } Simple_Public_Data;
-EAPI void simple_a_set(int a);
-EAPI Eina_Bool simple_a_print(void);
-EAPI Eina_Bool simple_class_print(void);
-EAPI Eina_Bool simple_class_print2(void);
+EAPI void simple_a_set(Eo *obj, int a);
+EAPI Eina_Bool simple_a_print(Eo *obj);
+EAPI Eina_Bool simple_class_print(Eo *obj);
+EAPI Eina_Bool simple_class_print2(Eo *obj);
 extern const Eo_Event_Description _SIG_A_CHANGED;
diff --git a/src/tests/eo/interface/interface_interface.h 
index 9af90a7..4dd19c4 100644
--- a/src/tests/eo/interface/interface_interface.h
+++ b/src/tests/eo/interface/interface_interface.h
@@ -1,7 +1,7 @@
 #ifndef INTERFACE_H
 #define INTERFACE_H
-EAPI int interface_ab_sum_get(void);
+EAPI int interface_ab_sum_get(Eo *obj);
 #define INTERFACE_CLASS interface_class_get()
 const Eo_Class *interface_class_get(void);
diff --git a/src/tests/eo/interface/interface_interface2.h 
index f02a547..e0fdcb0 100644
--- a/src/tests/eo/interface/interface_interface2.h
+++ b/src/tests/eo/interface/interface_interface2.h
@@ -1,7 +1,7 @@
 #ifndef INTERFACE2_H
 #define INTERFACE2_H
-EAPI int interface2_ab_sum_get2(void);
+EAPI int interface2_ab_sum_get2(Eo *obj);
 #define INTERFACE2_CLASS interface2_class_get()
 const Eo_Class *interface2_class_get(void);
diff --git a/src/tests/eo/interface/interface_simple.h 
index c4b3d7b..e10cde5 100644
--- a/src/tests/eo/interface/interface_simple.h
+++ b/src/tests/eo/interface/interface_simple.h
@@ -1,10 +1,10 @@
 #ifndef SIMPLE_H
 #define SIMPLE_H
-EAPI void simple_a_set(int a);
-EAPI int simple_a_get(void);
-EAPI void simple_b_set(int b);
-EAPI int simple_b_get(void);
+EAPI void simple_a_set(Eo *obj, int a);
+EAPI int simple_a_get(Eo *obj);
+EAPI void simple_b_set(Eo *obj, int b);
+EAPI int simple_b_get(Eo *obj);
 #define SIMPLE_CLASS simple_class_get()
 const Eo_Class *simple_class_get(void);
diff --git a/src/tests/eo/mixin/mixin_mixin.h b/src/tests/eo/mixin/mixin_mixin.h
index e97b609..3acbf91 100644
--- a/src/tests/eo/mixin/mixin_mixin.h
+++ b/src/tests/eo/mixin/mixin_mixin.h
@@ -1,7 +1,7 @@
 #ifndef MIXIN_H
 #define MIXIN_H
-EAPI int mixin_ab_sum_get(void);
+EAPI int mixin_ab_sum_get(Eo *obj);
 #define MIXIN_CLASS mixin_class_get()
 const Eo_Class *mixin_class_get(void);
diff --git a/src/tests/eo/mixin/mixin_simple.h 
index c4b3d7b..e10cde5 100644
--- a/src/tests/eo/mixin/mixin_simple.h
+++ b/src/tests/eo/mixin/mixin_simple.h
@@ -1,10 +1,10 @@
 #ifndef SIMPLE_H
 #define SIMPLE_H
-EAPI void simple_a_set(int a);
-EAPI int simple_a_get(void);
-EAPI void simple_b_set(int b);
-EAPI int simple_b_get(void);
+EAPI void simple_a_set(Eo *obj, int a);
+EAPI int simple_a_get(Eo *obj);
+EAPI void simple_b_set(Eo *obj, int b);
+EAPI int simple_b_get(Eo *obj);
 #define SIMPLE_CLASS simple_class_get()
 const Eo_Class *simple_class_get(void);
diff --git a/src/tests/eo/signals/signals_simple.h 
index ba50f98..830d236 100644
--- a/src/tests/eo/signals/signals_simple.h
+++ b/src/tests/eo/signals/signals_simple.h
@@ -6,7 +6,7 @@ typedef struct
    int cb_count;
 } Simple_Public_Data;
-EAPI void simple_a_set(int a);
+EAPI void simple_a_set(Eo *obj, int a);
 extern const Eo_Event_Description _EV_A_CHANGED;
 #define EV_A_CHANGED (&(_EV_A_CHANGED))
diff --git a/src/tests/eo/suite/eo_test_class_simple.h 
index 8fbb46e..43cdd28 100644
--- a/src/tests/eo/suite/eo_test_class_simple.h
+++ b/src/tests/eo/suite/eo_test_class_simple.h
@@ -6,14 +6,14 @@ typedef struct
    int a;
 } Simple_Public_Data;
-EAPI void simple_a_set(int a);
-EAPI int simple_a_get(void);
-EAPI Eina_Bool simple_a_print(void);
-EAPI Eina_Bool simple_class_hi_print(void);
-EAPI void simple_recursive(int n);
-EAPI void simple_pure_virtual(void);
-EAPI void simple_no_implementation(void);
-EAPI Eo *simple_part_get(const char *name);
+EAPI void simple_a_set(Eo *obj, int a);
+EAPI int simple_a_get(Eo *obj);
+EAPI Eina_Bool simple_a_print(Eo *obj);
+EAPI Eina_Bool simple_class_hi_print(Eo *obj);
+EAPI void simple_recursive(Eo *obj, int n);
+EAPI void simple_pure_virtual(Eo *obj);
+EAPI void simple_no_implementation(Eo *obj);
+EAPI Eo *simple_part_get(Eo *obj, const char *name);
 extern const Eo_Event_Description _EV_A_CHANGED;
 #define EV_A_CHANGED (&(_EV_A_CHANGED))
diff --git a/src/tests/eo/suite/eo_test_general.c 
index 4dd7f75..4800872 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -942,41 +942,6 @@ START_TEST(eo_add_failures)
-   int a = 0;
-   eo_init();
-   Eo *obj = eo_add(SIMPLE_CLASS, NULL);
-   simple_a_set(obj, 3);
-   a = simple_a_get(obj);
-   ck_assert_int_eq(a, 3);
-   eo_do_part(obj, simple_part_get("test"),
-         simple_a_set(7),
-         a = simple_a_get()
-         );
-   ck_assert_int_eq(a, 7);
-   simple_a_set(obj, 3);
-   a = simple_a_get(obj);
-   ck_assert_int_eq(a, 3);
-   /* Faking a call, just asserting NULL as the part to check default values. 
-   eo_do_part(obj, NULL,
-         simple_a_set(7),
-         a = simple_a_get()
-         );
-   ck_assert_int_eq(a, 0);
-   eo_del(obj);
-   eo_shutdown();
 void eo_test_general(TCase *tc)
    tcase_add_test(tc, eo_simple);
@@ -994,5 +959,4 @@ void eo_test_general(TCase *tc)
    tcase_add_test(tc, eo_add_do_and_custom);
    tcase_add_test(tc, eo_pointers_indirection);
    tcase_add_test(tc, eo_add_failures);
-   tcase_add_test(tc, eo_parts);


Reply via email to