From 70d9526934ab2ba3bb2541f629b14c76c2cde490 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 10 Oct 2019 15:26:34 +0200 Subject: [PATCH] :art: Test vm_remove --- tests/import/vm_remove.c | 24 ++++++++++++++++++++++++ tests/import/vm_remove.gw | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 tests/import/vm_remove.c create mode 100644 tests/import/vm_remove.gw 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); -- 2.43.0