summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-08-29 15:05:24 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-08-29 15:06:08 +0200
commit66b0555f595c8ce333334fd3e514a949e3d7f50b (patch)
tree94724c2819bc30ed1c017babef574e3257273201 /src/tests
parent54d97005668996322a743771def5f9cf17a16755 (diff)
eolian: disallow legacy keyword in enums in stable api
This also marks a bunch of users of that as beta, as they were effectively beta.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/eolian/data/enum.eo5
-rw-r--r--src/tests/eolian/data/typedef.eo8
-rw-r--r--src/tests/eolian/data/typedef_ref.h7
-rw-r--r--src/tests/eolian/eolian_parsing.c13
4 files changed, 0 insertions, 33 deletions
diff --git a/src/tests/eolian/data/enum.eo b/src/tests/eolian/data/enum.eo
index 73e8da07a3..bdc9a80e82 100644
--- a/src/tests/eolian/data/enum.eo
+++ b/src/tests/eolian/data/enum.eo
@@ -5,11 +5,6 @@ enum Foo {
5 baz = 5 * 3 5 baz = 5 * 3
6} 6}
7 7
8enum Bar {
9 legacy: test;
10 foo = Foo.baz
11}
12
13enum Baz { 8enum Baz {
14 flag1 = 1 << 0, 9 flag1 = 1 << 0,
15 flag2 = 1 << 1, 10 flag2 = 1 << 1,
diff --git a/src/tests/eolian/data/typedef.eo b/src/tests/eolian/data/typedef.eo
index 2e017324be..29f88e42c3 100644
--- a/src/tests/eolian/data/typedef.eo
+++ b/src/tests/eolian/data/typedef.eo
@@ -8,14 +8,6 @@ type @extern Evas.Pants: float; /* not generated */
8 8
9type @beta Undef: __undefined_type; /* not generated */ 9type @beta Undef: __undefined_type; /* not generated */
10 10
11enum Enum.Bar
12{
13 legacy: bar;
14 first_item = 0,
15 second_item,
16 last_item
17}
18
19enum Elm.Object.Select_Mode 11enum Elm.Object.Select_Mode
20{ 12{
21 default = 0, 13 default = 0,
diff --git a/src/tests/eolian/data/typedef_ref.h b/src/tests/eolian/data/typedef_ref.h
index 24583b590f..524f803aee 100644
--- a/src/tests/eolian/data/typedef_ref.h
+++ b/src/tests/eolian/data/typedef_ref.h
@@ -21,13 +21,6 @@ typedef Evas_Coord2 Evas_Coord3;
21 21
22typedef enum 22typedef enum
23{ 23{
24 BAR_FIRST_ITEM = 0,
25 BAR_SECOND_ITEM,
26 BAR_LAST_ITEM
27} Enum_Bar;
28
29typedef enum
30{
31 ELM_OBJECT_SELECT_MODE_DEFAULT = 0, 24 ELM_OBJECT_SELECT_MODE_DEFAULT = 0,
32 ELM_OBJECT_SELECT_MODE_ALWAYS, 25 ELM_OBJECT_SELECT_MODE_ALWAYS,
33 ELM_OBJECT_SELECT_MODE_NONE, 26 ELM_OBJECT_SELECT_MODE_NONE,
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index 9d6a219655..89daec1af5 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -928,19 +928,6 @@ EFL_START_TEST(eolian_enum)
928 fail_if(v.type != EOLIAN_EXPR_INT); 928 fail_if(v.type != EOLIAN_EXPR_INT);
929 fail_if(v.value.i != 15); 929 fail_if(v.value.i != 15);
930 930
931 fail_if(!(tdl = eolian_unit_enum_by_name_get(unit, "Bar")));
932 fail_if(strcmp(eolian_typedecl_enum_legacy_prefix_get(tdl), "test"));
933
934 fail_if(!(field = eolian_typedecl_enum_field_get(tdl, "foo")));
935 fail_if(!(exp = eolian_typedecl_enum_field_value_get(field, EINA_FALSE)));
936 v = eolian_expression_eval(exp, EOLIAN_MASK_ALL);
937 fail_if(v.type != EOLIAN_EXPR_INT);
938 fail_if(v.value.i != 15);
939
940 cname = eolian_typedecl_enum_field_c_constant_get(field);
941 fail_if(strcmp(cname, "TEST_FOO"));
942 eina_stringshare_del(cname);
943
944 fail_if(!(tdl = eolian_unit_enum_by_name_get(unit, "Baz"))); 931 fail_if(!(tdl = eolian_unit_enum_by_name_get(unit, "Baz")));
945 932
946 fail_if(!(field = eolian_typedecl_enum_field_get(tdl, "flag1"))); 933 fail_if(!(field = eolian_typedecl_enum_field_get(tdl, "flag1")));