]> Nishi Git Mirror - gwion.git/commitdiff
:white_check_mark: Update plug tests
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Mon, 4 May 2020 21:39:19 +0000 (23:39 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Mon, 4 May 2020 21:39:42 +0000 (23:39 +0200)
18 files changed:
tests/import/class_template.c
tests/import/class_template_fail.c
tests/import/class_template_invalid.c
tests/import/fptr_tmpl.c
tests/import/fptr_tmpl_fail.c
tests/import/func_fail2.c
tests/import/func_fail3.c
tests/import/func_fail4.c
tests/import/func_tmpl.c
tests/import/func_tmpl_fail.c
tests/import/invalid_names.c
tests/import/invalid_names3.c
tests/import/typedef_fail.c
tests/import/typedef_tmpl.c
tests/import/union_tmpl.c
tests/import/union_tmpl_fail.c
tests/import/union_tmpl_fail2.c
tests/import/union_tmpl_fail3.c

index 1bc3adb2568a6e9f30ce02a441bce225c8c32d90..ff335e08c5602a85489f57a9218aa4dc0d130456 100644 (file)
@@ -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;
 }
index ecb9ecc1c6eb621094bfd144ca1125ab28c4b305..5bdccfb1f7b3723c9784d56e61d1ff2df3578708 100644 (file)
@@ -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))
index 8c7da6116fd12a2a28b3f3bb14ad7aadbde05bb9..0d61fc3bc345d3c129c4ba7969bdcba1dc750fba 100644 (file)
@@ -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;
 }
index 4adb3e307c8b4c09c3cf4d81c85a8104ba76c305..e9b6a8d33a8b47173f3abab45779b66a4d1d210a 100644 (file)
@@ -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;
 }
index 2ec528c32ce4d47fb39588f2a6978b745ec85b3e..5ddd4a42d7f5708ec2aeb5fe75b8801e1dfc1835 100644 (file)
@@ -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;
 }
index ade635789e301391cd92207bb24467461b839d80..972a5e5d72ec279126dcbff04e39f701df0ab5e3 100644 (file)
@@ -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))
index 09402e9a2dd8ecee805685778b1ee7fa16fd4f20..3088d539cd876d5c72850322d2bb25be3a97b49e 100644 (file)
@@ -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))
index 06c7f384c2861f8ac344d144b95920e7838ccbdb..9781f087b2be0d3d8754e534e2dcb8c7f7424fc5 100644 (file)
@@ -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;
index 0214bd24a2a24fce620e8ed4306a054d2bb9c10b..edb848410cab965b332f4ece51ce1f7ee613850d 100644 (file)
@@ -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;
index f01dddad1c611116b7f6ab0157cd817197497358..ca5a35d357784ed4eb6c1694412b65511bd65852 100644 (file)
@@ -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;
 }
index 66ec9711d00824d77bd6600e60df1d055d7ab974..16b3b628a7a18aa40db7133723f58311cb7c08c0 100644 (file)
@@ -22,7 +22,7 @@ GWION_IMPORT(trig) {
   const Type t2 = gwi_mk_type(gwi, "T<a>", 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;
index 02c7033afa1ec35cdeddd353dce45bf508dd185f..11989406ef679b87dc21b54b3fddeb6b9a8055c0 100644 (file)
@@ -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);
 }
index e3151146ceadadd25c17bebc60070952048714a8..fed34adcab8a64c065b2fd2a9344a3ac4d36dc3f 100644 (file)
@@ -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;
 }
index 1ae96db9070b5e250ca718ddecece593aa5db767..a395b7bef9497d9a59a8a4390bcb174373ce66e1 100644 (file)
@@ -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;
 }
index aa65700d0abef5bde899ea844e5c0eb38c2713e7..341379d318c7d0174eb4e1e6f1b63916597f7a30 100644 (file)
@@ -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"))
index 57da35a86a8e630a45b00fb0a697b08b0b2b21be..05314645dabc1cdfdb85f577fd0016f20e102390 100644 (file)
@@ -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"))
index 994dd3ee22b697d47abdc29f7900382881a7ec63..47bb3be6daec97e01f4c6b3dc19b704783fb9c81 100644 (file)
@@ -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;
 }
index f8fa4eb9884b45b47beb859c294f3c3b1030fb39..b3736a820238d18be4af3701971dd3ec2e742dbe 100644 (file)
@@ -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"))