summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-08-01 16:47:52 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-08-01 16:55:31 +0200
commit1bcca58d826a2d8fcd88b529b8e5863c6f54ec47 (patch)
tree5c5db53ccd118aa175b45949b791189b32b73a5a /src/tests
parentadaea4170af0268f7d2b69cba4c62bbc9a7396a9 (diff)
eolian: disallow ptr() in containers in stable API
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/eolian/data/complex_type.eo4
-rw-r--r--src/tests/eolian/data/owning.eo8
-rw-r--r--src/tests/eolian/data/owning_ref.c4
-rw-r--r--src/tests/eolian/data/typedef.eo4
-rw-r--r--src/tests/eolian/eolian_parsing.c4
5 files changed, 8 insertions, 16 deletions
diff --git a/src/tests/eolian/data/complex_type.eo b/src/tests/eolian/data/complex_type.eo
index f2c03676e0..1c8c30823a 100644
--- a/src/tests/eolian/data/complex_type.eo
+++ b/src/tests/eolian/data/complex_type.eo
@@ -1,10 +1,8 @@
1struct @free(efl_del) @extern Eo;
2
3class Complex_Type { 1class Complex_Type {
4 methods { 2 methods {
5 @property a { 3 @property a {
6 set { 4 set {
7 return: list<array<ptr(Eo) @owned> > @owned; 5 return: list<array<strbuf @owned> > @owned;
8 } 6 }
9 get { 7 get {
10 } 8 }
diff --git a/src/tests/eolian/data/owning.eo b/src/tests/eolian/data/owning.eo
index ae926a5e35..e0c97c52fe 100644
--- a/src/tests/eolian/data/owning.eo
+++ b/src/tests/eolian/data/owning.eo
@@ -1,7 +1,3 @@
1struct @free(free_a) Test.A {
2 t : int;
3}
4
5class Owning { 1class Owning {
6 methods { 2 methods {
7 test1 { 3 test1 {
@@ -14,8 +10,8 @@ class Owning {
14 } 10 }
15 test2 { 11 test2 {
16 params { 12 params {
17 test1 : list<ptr(Test.A) @owned> @owned; 13 test1 : list<array<int> @owned> @owned;
18 test2 : hash<string, ptr(Test.A) @owned> @owned; 14 test2 : hash<string, array<int> @owned> @owned;
19 } 15 }
20 } 16 }
21 17
diff --git a/src/tests/eolian/data/owning_ref.c b/src/tests/eolian/data/owning_ref.c
index 10a7f10a13..6c9b30debe 100644
--- a/src/tests/eolian/data/owning_ref.c
+++ b/src/tests/eolian/data/owning_ref.c
@@ -18,10 +18,10 @@ void _owning_test2(Eo *obj, Owning_Data *pd, Eina_List *test1, Eina_Hash *test2)
18static void 18static void
19_owning_test2_ownership_fallback(Eina_List *test1, Eina_Hash *test2) 19_owning_test2_ownership_fallback(Eina_List *test1, Eina_Hash *test2)
20{ 20{
21 Test_A *test1_iter; 21 Eina_Array *test1_iter;
22 EINA_LIST_FREE(test1,test1_iter) 22 EINA_LIST_FREE(test1,test1_iter)
23 { 23 {
24 free_a(test1_iter); 24 eina_array_free(test1_iter);
25 } 25 }
26 eina_hash_free_cb_set(test2,NULL); 26 eina_hash_free_cb_set(test2,NULL);
27 eina_hash_free(test2); 27 eina_hash_free(test2);
diff --git a/src/tests/eolian/data/typedef.eo b/src/tests/eolian/data/typedef.eo
index 31bf9c627c..ab4d991954 100644
--- a/src/tests/eolian/data/typedef.eo
+++ b/src/tests/eolian/data/typedef.eo
@@ -1,7 +1,5 @@
1struct @extern Eo;
2
3type Evas.Coord: int; /* Simple type definition */ 1type Evas.Coord: int; /* Simple type definition */
4type List_Objects: list<ptr(Eo)>; /* A little more complex */ 2type List_Objects: list<Typedef>; /* A little more complex */
5 3
6type Evas.Coord2: Evas.Coord; 4type Evas.Coord2: Evas.Coord;
7type Evas.Coord3: Evas.Coord2; 5type Evas.Coord3: Evas.Coord2;
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index ccabb263fd..f1294b720c 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -383,7 +383,7 @@ EFL_START_TEST(eolian_typedef)
383 fail_if(!(type = eolian_type_base_type_get(type))); 383 fail_if(!(type = eolian_type_base_type_get(type)));
384 fail_if(!!eolian_type_next_type_get(type)); 384 fail_if(!!eolian_type_next_type_get(type));
385 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT))); 385 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT)));
386 fail_if(strcmp(type_name, "Eo *")); 386 fail_if(strcmp(type_name, "Typedef *"));
387 fail_if(eolian_type_is_owned(type)); 387 fail_if(eolian_type_is_owned(type));
388 eina_stringshare_del(type_name); 388 eina_stringshare_del(type_name);
389 389
@@ -446,7 +446,7 @@ EFL_START_TEST(eolian_complex_type)
446 fail_if(!!eolian_type_next_type_get(type)); 446 fail_if(!!eolian_type_next_type_get(type));
447 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT))); 447 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT)));
448 fail_if(!eolian_type_is_owned(type)); 448 fail_if(!eolian_type_is_owned(type));
449 fail_if(strcmp(type_name, "Eo *")); 449 fail_if(strcmp(type_name, "Eina_Strbuf *"));
450 eina_stringshare_del(type_name); 450 eina_stringshare_del(type_name);
451 /* Properties parameter type */ 451 /* Properties parameter type */
452 fail_if(!(iter = eolian_property_values_get(fid, EOLIAN_PROP_GET))); 452 fail_if(!(iter = eolian_property_values_get(fid, EOLIAN_PROP_GET)));