new testing infrastructure

This commit is contained in:
Francesco Cozzuto
2023-01-22 02:22:44 +01:00
parent 533cf01920
commit 1780826a97
145 changed files with 1432 additions and 938 deletions
@@ -0,0 +1,12 @@
@type [compiler]
@source
func();
@bytecode
PUSHVAR "func";
CALL 0, 1;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
func(none);
@bytecode
PUSHNNE;
PUSHVAR "func";
CALL 1, 1;
POP 1;
EXIT;
@@ -0,0 +1,14 @@
@type [compiler]
@source
func(true, false);
@bytecode
PUSHFLS;
PUSHTRU;
PUSHVAR "func";
CALL 2, 1;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
set[key];
@bytecode
PUSHVAR "set";
PUSHVAR "key";
SELECT;
POP 1;
EXIT;
@@ -0,0 +1,26 @@
@type [compiler]
@source
set["dog", "cow", "cat"];
@bytecode
PUSHVAR "set";
PUSHLST 3;
PUSHINT 0;
PUSHSTR "dog";
INSERT;
PUSHINT 1;
PUSHSTR "cow";
INSERT;
PUSHINT 2;
PUSHSTR "cat";
INSERT;
SELECT;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
set.key;
@bytecode
PUSHVAR "set";
PUSHSTR "key";
SELECT;
POP 1;
EXIT;