From c8f58c2f79c1714d337b57447265fc0c10fc455d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 4 May 2020 23:39:19 +0200 Subject: [PATCH] :white_check_mark: Update plug tests --- tests/import/class_template.c | 6 +++--- tests/import/class_template_fail.c | 2 +- tests/import/class_template_invalid.c | 6 +++--- tests/import/fptr_tmpl.c | 2 +- tests/import/fptr_tmpl_fail.c | 2 +- tests/import/func_fail2.c | 2 +- tests/import/func_fail3.c | 2 +- tests/import/func_fail4.c | 2 +- tests/import/func_tmpl.c | 2 +- tests/import/func_tmpl_fail.c | 2 +- tests/import/invalid_names.c | 2 +- tests/import/invalid_names3.c | 2 +- tests/import/typedef_fail.c | 4 ++-- tests/import/typedef_tmpl.c | 2 +- tests/import/union_tmpl.c | 2 +- tests/import/union_tmpl_fail.c | 2 +- tests/import/union_tmpl_fail2.c | 4 ++-- tests/import/union_tmpl_fail3.c | 2 +- 18 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/import/class_template.c b/tests/import/class_template.c index 1bc3adb2..ff335e08 100644 --- a/tests/import/class_template.c +++ b/tests/import/class_template.c @@ -25,17 +25,17 @@ static CTOR(class_template_ctor) { } GWION_IMPORT(class_template) { - GWI_OB(gwi_class_ini(gwi, "ClassTemplate<~A,B~>", NULL)) + GWI_OB(gwi_class_ini(gwi, "<~A,B~>ClassTemplate", NULL)) gwi_class_xtor(gwi, class_template_ctor, NULL); GWI_BB(gwi_item_ini(gwi, "A[]", "key")) GWI_BB((o_map_key = gwi_item_end(gwi, ae_flag_member | ae_flag_template, NULL))) GWI_BB(gwi_item_ini(gwi, "B[]", "value")) GWI_BB((o_map_value = gwi_item_end(gwi, ae_flag_member, NULL))) - GWI_BB(gwi_func_ini(gwi, "int", "test<~C,D~>")) + GWI_BB(gwi_func_ini(gwi, "int", "<~C,D~>test")) GWI_BB(gwi_func_end(gwi, (f_xfun)1, ae_flag_none)) GWI_BB(gwi_class_end(gwi)) - GWI_BB(gwi_item_ini(gwi, "ClassTemplate<~Ptr<~int~>,int[]~>", "testObject")) + GWI_BB(gwi_item_ini(gwi, "<~Ptr<~int~>,int[]~>ClassTemplate", "testObject")) GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) return GW_OK; } diff --git a/tests/import/class_template_fail.c b/tests/import/class_template_fail.c index ecb9ecc1..5bdccfb1 100644 --- a/tests/import/class_template_fail.c +++ b/tests/import/class_template_fail.c @@ -10,7 +10,7 @@ #include "gwi.h" GWION_IMPORT(class_template_fail) { - GWI_OB(gwi_class_ini(gwi, "ClassTemplate<~A,B~>", NULL)) + GWI_OB(gwi_class_ini(gwi, "<~A,B~>ClassTemplate", NULL)) GWI_BB(gwi_func_ini(gwi, "int", "test")) GWI_BB(gwi_func_end(gwi, (f_xfun)1, ae_flag_none)) GWI_BB(gwi_class_end(gwi)) diff --git a/tests/import/class_template_invalid.c b/tests/import/class_template_invalid.c index 8c7da611..0d61fc3b 100644 --- a/tests/import/class_template_invalid.c +++ b/tests/import/class_template_invalid.c @@ -15,16 +15,16 @@ static m_int o_map_value; #define MAP_VAL(a) *((M_Object*)(a->data + o_map_value)) GWION_IMPORT(class_template) { - GWI_OB(gwi_class_ini(gwi, "ClassTemplate<~A,B~>", NULL)) + GWI_OB(gwi_class_ini(gwi, "<~A,B~>ClassTemplate", NULL)) GWI_BB(gwi_item_ini(gwi, "A[]", "key")) GWI_BB((o_map_key = gwi_item_end(gwi, ae_flag_member | ae_flag_template, NULL))) GWI_BB(gwi_item_ini(gwi, "B[]", "value")) GWI_BB((o_map_value = gwi_item_end(gwi, ae_flag_member, NULL))) - GWI_BB(gwi_func_ini(gwi, "int", "test<~C,D'~>")) + GWI_BB(gwi_func_ini(gwi, "int", "<~C,D~>test")) GWI_BB(gwi_func_end(gwi, (f_xfun)1, ae_flag_none)) GWI_BB(gwi_class_end(gwi)) - GWI_BB(gwi_item_ini(gwi, "ClassTemplate<~Ptr<~int~>,int[]~>", "testObject")) + GWI_BB(gwi_item_ini(gwi, "<~Ptr<~int~>,int[]~>ClassTemplate", "testObject")) GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) return GW_OK; } diff --git a/tests/import/fptr_tmpl.c b/tests/import/fptr_tmpl.c index 4adb3e30..e9b6a8d3 100644 --- a/tests/import/fptr_tmpl.c +++ b/tests/import/fptr_tmpl.c @@ -11,7 +11,7 @@ GWION_IMPORT(typedef_test) { Type t_func_typedef; GWI_OB((t_func_typedef = gwi_mk_type(gwi, "FuncTypedef", SZ_INT , NULL))) - GWI_BB(gwi_fptr_ini(gwi, "int", "test<~A~>")) + GWI_BB(gwi_fptr_ini(gwi, "int", "<~A~>test")) GWI_OB(gwi_fptr_end(gwi, 0)) return GW_OK; } diff --git a/tests/import/fptr_tmpl_fail.c b/tests/import/fptr_tmpl_fail.c index 2ec528c3..5ddd4a42 100644 --- a/tests/import/fptr_tmpl_fail.c +++ b/tests/import/fptr_tmpl_fail.c @@ -9,7 +9,7 @@ #include "import.h" GWION_IMPORT(typedef_test) { - GWI_BB(gwi_fptr_ini(gwi, "int~", "test<~A~>")) + GWI_BB(gwi_fptr_ini(gwi, "int~", "<~A~>test")) GWI_OB(gwi_fptr_end(gwi, 0)) return GW_OK; } diff --git a/tests/import/func_fail2.c b/tests/import/func_fail2.c index ade63578..972a5e5d 100644 --- a/tests/import/func_fail2.c +++ b/tests/import/func_fail2.c @@ -10,7 +10,7 @@ #include "instr.h" GWION_IMPORT(too_many_args) { - GWI_BB(gwi_func_ini(gwi, "Ptr<~int~>", "test")) + GWI_BB(gwi_func_ini(gwi, "<~int~>Ptr", "test")) GWI_BB(gwi_func_arg(gwi, "int", "i[][]")) GWI_BB(gwi_func_arg(gwi, "int", "me")) GWI_BB(gwi_func_end(gwi, (f_xfun)1, ae_flag_none)) diff --git a/tests/import/func_fail3.c b/tests/import/func_fail3.c index 09402e9a..3088d539 100644 --- a/tests/import/func_fail3.c +++ b/tests/import/func_fail3.c @@ -10,7 +10,7 @@ #include "instr.h" GWION_IMPORT(too_many_args) { - GWI_BB(gwi_func_ini(gwi, "Ptr<~int~>", "test<~A~>")) + GWI_BB(gwi_func_ini(gwi, "<~int~>Ptr", "<~A~>test")) GWI_BB(gwi_func_ini(gwi, "int", "test")) GWI_BB(gwi_func_arg(gwi, "int", "i[][]")) GWI_BB(gwi_func_end(gwi, (f_xfun)1, ae_flag_none)) diff --git a/tests/import/func_fail4.c b/tests/import/func_fail4.c index 06c7f384..9781f087 100644 --- a/tests/import/func_fail4.c +++ b/tests/import/func_fail4.c @@ -10,7 +10,7 @@ #include "instr.h" GWION_IMPORT(too_many_args) { - GWI_BB(gwi_func_ini(gwi, "Ptr<~int~>", "test<~A~>")) + GWI_BB(gwi_func_ini(gwi, "<~int~>Ptr", "<~A~>test")) GWI_BB(gwi_func_arg(gwi, "int", "i[][]")) GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) return GW_OK; diff --git a/tests/import/func_tmpl.c b/tests/import/func_tmpl.c index 0214bd24..edb84841 100644 --- a/tests/import/func_tmpl.c +++ b/tests/import/func_tmpl.c @@ -14,7 +14,7 @@ static SFUN(func_tmpl_xfun) { } GWION_IMPORT(func_tmpl) { - GWI_BB(gwi_func_ini(gwi, "int[]", "test<~A~>")) + GWI_BB(gwi_func_ini(gwi, "int[]", "<~A~>test")) GWI_BB(gwi_func_arg(gwi, "A", "i")) GWI_BB(gwi_func_end(gwi, func_tmpl_xfun, ae_flag_none)) return GW_OK; diff --git a/tests/import/func_tmpl_fail.c b/tests/import/func_tmpl_fail.c index f01dddad..ca5a35d3 100644 --- a/tests/import/func_tmpl_fail.c +++ b/tests/import/func_tmpl_fail.c @@ -14,7 +14,7 @@ static SFUN(func_tmpl_xfun) { } GWION_IMPORT(func_tmpl) { - GWI_BB(gwi_func_ini(gwi, "voit", "test<~A~>")) + GWI_BB(gwi_func_ini(gwi, "voit", "<~A~>test")) GWI_BB(gwi_func_end(gwi, func_tmpl_xfun, ae_flag_none)) return GW_OK; } diff --git a/tests/import/invalid_names.c b/tests/import/invalid_names.c index 66ec9711..16b3b628 100644 --- a/tests/import/invalid_names.c +++ b/tests/import/invalid_names.c @@ -22,7 +22,7 @@ GWION_IMPORT(trig) { const Type t2 = gwi_mk_type(gwi, "T", SZ_INT, NULL); gwi_add_type(gwi, t2); - const Type t3 = gwi_mk_type(gwi, "T<~a~>", SZ_INT, NULL); + const Type t3 = gwi_mk_type(gwi, "<~a~>T", SZ_INT, NULL); gwi_add_type(gwi, t3); return GW_OK; diff --git a/tests/import/invalid_names3.c b/tests/import/invalid_names3.c index 02c7033a..11989406 100644 --- a/tests/import/invalid_names3.c +++ b/tests/import/invalid_names3.c @@ -13,6 +13,6 @@ #include "gwi.h" GWION_IMPORT(trig) { - DECL_OB(const Type, t0, = gwi_mk_type(gwi, "T<~a~>", SZ_INT, NULL)) + DECL_OB(const Type, t0, = gwi_mk_type(gwi, "<~a~>T", SZ_INT, NULL)) return gwi_add_type(gwi, t0); } diff --git a/tests/import/typedef_fail.c b/tests/import/typedef_fail.c index e3151146..fed34adc 100644 --- a/tests/import/typedef_fail.c +++ b/tests/import/typedef_fail.c @@ -9,7 +9,7 @@ #include "import.h" GWION_IMPORT(typedef_test) { - GWI_BB(gwi_typedef_ini(gwi, "int", "Typedef<~A~>")) - GWI_BB(gwi_typedef_ini(gwi, "int", "Typedef<~A~>")) + GWI_BB(gwi_typedef_ini(gwi, "int", "<~A~>Typedef")) + GWI_BB(gwi_typedef_ini(gwi, "int", "<~A~>Typedef")) return GW_OK; } diff --git a/tests/import/typedef_tmpl.c b/tests/import/typedef_tmpl.c index 1ae96db9..a395b7be 100644 --- a/tests/import/typedef_tmpl.c +++ b/tests/import/typedef_tmpl.c @@ -9,7 +9,7 @@ #include "import.h" GWION_IMPORT(typedef_test) { - GWI_BB(gwi_typedef_ini(gwi, "Ptr<~A~>", "Typedef<~A~>")) + GWI_BB(gwi_typedef_ini(gwi, "<~A~>Ptr", "<~A~>Typedef")) GWI_OB(gwi_typedef_end(gwi, ae_flag_none)) return GW_OK; } diff --git a/tests/import/union_tmpl.c b/tests/import/union_tmpl.c index aa65700d..341379d3 100644 --- a/tests/import/union_tmpl.c +++ b/tests/import/union_tmpl.c @@ -9,7 +9,7 @@ #include "import.h" GWION_IMPORT(union_test) { - GWI_BB(gwi_union_ini(gwi, "U<~A~>", NULL)) + GWI_BB(gwi_union_ini(gwi, "<~A~>U", NULL)) GWI_BB(gwi_union_add(gwi,"float", "f")) GWI_BB(gwi_union_add(gwi,"int", "i")) GWI_BB(gwi_union_add(gwi,"A", "a")) diff --git a/tests/import/union_tmpl_fail.c b/tests/import/union_tmpl_fail.c index 57da35a8..05314645 100644 --- a/tests/import/union_tmpl_fail.c +++ b/tests/import/union_tmpl_fail.c @@ -9,7 +9,7 @@ #include "import.h" GWION_IMPORT(union_test) { - GWI_BB(gwi_union_ini(gwi, "U<~A~>", "My")) + GWI_BB(gwi_union_ini(gwi, "<~A~>U", "My")) GWI_BB(gwi_union_add(gwi,"float", "f")) GWI_BB(gwi_union_add(gwi,"int", "i")) GWI_BB(gwi_union_add(gwi,"A", "a")) diff --git a/tests/import/union_tmpl_fail2.c b/tests/import/union_tmpl_fail2.c index 994dd3ee..47bb3be6 100644 --- a/tests/import/union_tmpl_fail2.c +++ b/tests/import/union_tmpl_fail2.c @@ -9,11 +9,11 @@ #include "import.h" GWION_IMPORT(union_test) { - GWI_BB(gwi_union_ini(gwi, "U<~A~>", NULL)) + GWI_BB(gwi_union_ini(gwi, "<~A~>U", NULL)) GWI_BB(gwi_union_add(gwi,"float", "f")) GWI_BB(gwi_union_add(gwi,"int", "i")) GWI_BB(gwi_union_add(gwi,"A", "a")) - GWI_BB(gwi_union_ini(gwi, "U<~A~>", NULL)) + GWI_BB(gwi_union_ini(gwi, "<~A~>U", NULL)) GWI_OB(gwi_union_end(gwi, 0)) return GW_OK; } diff --git a/tests/import/union_tmpl_fail3.c b/tests/import/union_tmpl_fail3.c index f8fa4eb9..b3736a82 100644 --- a/tests/import/union_tmpl_fail3.c +++ b/tests/import/union_tmpl_fail3.c @@ -9,7 +9,7 @@ #include "import.h" GWION_IMPORT(union_test) { - GWI_BB(gwi_union_ini(gwi, "U<~A~>", "Test")) + GWI_BB(gwi_union_ini(gwi, "<~A~>U", "Test")) GWI_BB(gwi_union_add(gwi,"float", "f")) GWI_BB(gwi_union_add(gwi,"int", "i")) GWI_BB(gwi_union_add(gwi,"A", "a")) -- 2.43.0