From: fennecdjay Date: Thu, 10 Oct 2019 13:26:34 +0000 (+0200) Subject: :art: Test vm_remove X-Git-Tag: nightly~2198^2~22 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=70d9526934ab2ba3bb2541f629b14c76c2cde490;p=gwion.git :art: Test vm_remove --- diff --git a/tests/import/vm_remove.c b/tests/import/vm_remove.c new file mode 100644 index 00000000..6bed6829 --- /dev/null +++ b/tests/import/vm_remove.c @@ -0,0 +1,24 @@ +#include "gwion_util.h" +#include "gwion_ast.h" +#include "oo.h" +#include "vm.h" +#include "env.h" +#include "type.h" +#include "instr.h" +#include "object.h" +#include "gwion.h" +#include "value.h" +#include "operator.h" +#include "import.h" +#include "instr.h" + +SFUN(coverage_int) { + vm_remove(shred->info->vm, *(m_int*)MEM(0)); +} + +GWION_IMPORT(gwion_remove_test) { + GWI_BB(gwi_func_ini(gwi, "int", "test", coverage_int)) + GWI_BB(gwi_func_arg(gwi, "int", "i")) + GWI_BB(gwi_func_end(gwi, 0)) + return GW_OK; +} diff --git a/tests/import/vm_remove.gw b/tests/import/vm_remove.gw new file mode 100644 index 00000000..31429431 --- /dev/null +++ b/tests/import/vm_remove.gw @@ -0,0 +1,2 @@ +test(12); +test(1);