From: fennecdjay Date: Fri, 11 Oct 2019 22:48:22 +0000 (+0200) Subject: :art: More ... X-Git-Tag: nightly~2161 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=5bae0859eae625736ec02e87822f617ebcb571f7;p=gwion.git :art: More ... --- 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; +}