]> Nishi Git Mirror - gwion.git/commitdiff
:art: Test vm_remove
authorfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 10 Oct 2019 13:26:34 +0000 (15:26 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 10 Oct 2019 13:26:34 +0000 (15:26 +0200)
tests/import/vm_remove.c [new file with mode: 0644]
tests/import/vm_remove.gw [new file with mode: 0644]

diff --git a/tests/import/vm_remove.c b/tests/import/vm_remove.c
new file mode 100644 (file)
index 0000000..6bed682
--- /dev/null
@@ -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 (file)
index 0000000..3142943
--- /dev/null
@@ -0,0 +1,2 @@
+test(12);
+test(1);