From 5bae0859eae625736ec02e87822f617ebcb571f7 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 12 Oct 2019 00:48:22 +0200 Subject: [PATCH] :art: More ... --- tests/import/fail_on_next_arg2.c | 25 +++++++++++++++++++++++++ tests/import/func_fail.c | 1 + tests/import/str2list_fail.c | 20 ++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 tests/import/fail_on_next_arg2.c create mode 100644 tests/import/str2list_fail.c diff --git a/tests/import/fail_on_next_arg2.c b/tests/import/fail_on_next_arg2.c new file mode 100644 index 00000000..92790138 --- /dev/null +++ b/tests/import/fail_on_next_arg2.c @@ -0,0 +1,25 @@ +#include +#include +#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); +} diff --git a/tests/import/func_fail.c b/tests/import/func_fail.c index 8227bff3..8bce14f7 100644 --- a/tests/import/func_fail.c +++ b/tests/import/func_fail.c @@ -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 index 00000000..d39cc231 --- /dev/null +++ b/tests/import/str2list_fail.c @@ -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; +} -- 2.43.0