summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2017-06-30 19:26:52 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-07-13 18:34:56 -0300
commit026fe3195a694b8787fcb88d9b682b2efe47e5f8 (patch)
tree3d98c35507cdaed15df2ab061c40fb38fb9076d7
parent71b326346b4217fa5cf05ebd4e41ddee67fab4f7 (diff)
efl_mono: move test code to a better place
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c84
1 files changed, 44 insertions, 40 deletions
diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c
index cc34499d3a..d23c74e46d 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -3037,46 +3037,9 @@ Eina_Iterator *_test_testing_eina_iterator_obj_return_own(EINA_UNUSED Eo *obj, E
3037 return eina_array_iterator_new(arr); 3037 return eina_array_iterator_new(arr);
3038} 3038}
3039 3039
3040// // 3040// //
3041// Class constructor 3041// Callbacks and Function Pointers //
3042// // 3042// //
3043EOLIAN static void
3044_test_testing_class_constructor(Efl_Class *klass)
3045{
3046 (void)klass;
3047 modified_seq_obj[0] = base_seq_obj[0] = _new_obj(0x0);
3048 modified_seq_obj[1] = base_seq_obj[1] = _new_obj(0x2A);
3049 modified_seq_obj[2] = base_seq_obj[2] = _new_obj(0x42);
3050 modified_seq_obj[3] = _new_obj(42);
3051 modified_seq_obj[4] = _new_obj(43);
3052 modified_seq_obj[5] = _new_obj(33);
3053}
3054
3055EOLIAN static void
3056_test_testing_class_destructor(Efl_Class *klass)
3057{
3058 (void)klass;
3059 for (unsigned i = 0; i < base_seq_obj_size; ++i)
3060 efl_unref(base_seq_obj[i]);
3061 for (unsigned i = 0; i < modified_seq_obj_size; ++i)
3062 efl_unref(modified_seq_obj[i]);
3063}
3064
3065
3066// ################## //
3067// Test.Numberwrapper //
3068// ################## //
3069
3070
3071void _test_numberwrapper_number_set(EINA_UNUSED Eo *obj, Test_Numberwrapper_Data *pd, int n)
3072{
3073 pd->number = n;
3074}
3075
3076int _test_numberwrapper_number_get(EINA_UNUSED Eo *obj, Test_Numberwrapper_Data *pd)
3077{
3078 return pd->number;
3079}
3080 3043
3081void _test_testing_set_callback(EINA_UNUSED Eo *obj, Test_Testing_Data *pd, SimpleCb cb, void *cb_data, Eina_Free_Cb cb_free_cb) 3044void _test_testing_set_callback(EINA_UNUSED Eo *obj, Test_Testing_Data *pd, SimpleCb cb, void *cb_data, Eina_Free_Cb cb_free_cb)
3082{ 3045{
@@ -3153,6 +3116,47 @@ Eina_Error _test_testing_returns_error(EINA_UNUSED Eo *obj, Test_Testing_Data *p
3153 return pd->error_code; 3116 return pd->error_code;
3154} 3117}
3155 3118
3119// //
3120// Class constructor
3121// //
3122EOLIAN static void
3123_test_testing_class_constructor(Efl_Class *klass)
3124{
3125 (void)klass;
3126 modified_seq_obj[0] = base_seq_obj[0] = _new_obj(0x0);
3127 modified_seq_obj[1] = base_seq_obj[1] = _new_obj(0x2A);
3128 modified_seq_obj[2] = base_seq_obj[2] = _new_obj(0x42);
3129 modified_seq_obj[3] = _new_obj(42);
3130 modified_seq_obj[4] = _new_obj(43);
3131 modified_seq_obj[5] = _new_obj(33);
3132}
3133
3134EOLIAN static void
3135_test_testing_class_destructor(Efl_Class *klass)
3136{
3137 (void)klass;
3138 for (unsigned i = 0; i < base_seq_obj_size; ++i)
3139 efl_unref(base_seq_obj[i]);
3140 for (unsigned i = 0; i < modified_seq_obj_size; ++i)
3141 efl_unref(modified_seq_obj[i]);
3142}
3143
3144
3145// ################## //
3146// Test.Numberwrapper //
3147// ################## //
3148
3149
3150void _test_numberwrapper_number_set(EINA_UNUSED Eo *obj, Test_Numberwrapper_Data *pd, int n)
3151{
3152 pd->number = n;
3153}
3154
3155int _test_numberwrapper_number_get(EINA_UNUSED Eo *obj, Test_Numberwrapper_Data *pd)
3156{
3157 return pd->number;
3158}
3159
3156#include "test_testing.eo.c" 3160#include "test_testing.eo.c"
3157#include "test_numberwrapper.eo.c" 3161#include "test_numberwrapper.eo.c"
3158 3162