]> Nishi Git Mirror - gwion.git/commitdiff
:art: More ...
authorfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 11 Oct 2019 22:48:22 +0000 (00:48 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 11 Oct 2019 22:48:22 +0000 (00:48 +0200)
tests/import/fail_on_next_arg2.c [new file with mode: 0644]
tests/import/func_fail.c
tests/import/str2list_fail.c [new file with mode: 0644]

diff --git a/tests/import/fail_on_next_arg2.c b/tests/import/fail_on_next_arg2.c
new file mode 100644 (file)
index 0000000..9279013
--- /dev/null
@@ -0,0 +1,25 @@
+#include <stdlib.h>
+#include <math.h>
+#include "gwion_util.h"
+#include "gwion_ast.h"
+#include "oo.h"
+#include "env.h"
+#include "vm.h"
+#include "gwion.h"
+#include "type.h"
+#include "instr.h"
+#include "object.h"
+#include "value.h"
+#include "operator.h"
+#include "import.h"
+#include "ugen.h"
+#include "func.h"
+#include "gwi.h"
+
+GWION_IMPORT(fail_on_next_arg) {
+  GWI_BB(gwi_func_ini(gwi, "void", "test", (f_xfun)1))
+  GWI_BB(gwi_func_arg(gwi, "int", "i"))
+  GWI_BB(gwi_func_arg(gwi, "i;t", "j"))
+  GWI_BB(gwi_func_arg(gwi, "int", "j[]"))
+  return gwi_func_end(gwi, ae_flag_none);
+}
index 8227bff35799b98bf64bf1f4055b2a087d418cab..8bce14f77c20be86e81c72b2ed11d0765629a1ee 100644 (file)
@@ -14,6 +14,7 @@
 
 GWION_IMPORT(too_many_args) {
   GWI_BB(gwi_func_ini(gwi, "int", "test", (f_xfun)1))
+  GWI_BB(gwi_func_arg(gwi, "int", "i[][]"))
   GWI_BB(gwi_func_arg(gwi, "Int", "i"))
   GWI_BB(gwi_func_end(gwi, 0))
   return GW_OK;
diff --git a/tests/import/str2list_fail.c b/tests/import/str2list_fail.c
new file mode 100644 (file)
index 0000000..d39cc23
--- /dev/null
@@ -0,0 +1,20 @@
+#include "gwion_util.h"
+#include "gwion_ast.h"
+#include "oo.h"
+#include "vm.h"
+#include "env.h"
+#include "type.h"
+#include "object.h"
+#include "instr.h"
+#include "gwion.h"
+#include "value.h"
+#include "operator.h"
+#include "import.h"
+#include "gwi.h"
+
+
+GWION_IMPORT(global_var_test) {
+  GWI_BB(gwi_item_ini(gwi,"SoemClass.child", "i"))
+  GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+  return GW_OK;
+}