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,13 @@
@type [compiler]
@source
1 + 7;
@bytecode
PUSHINT 1;
PUSHINT 7;
ADD;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1 - 7;
@bytecode
PUSHINT 1;
PUSHINT 7;
SUB;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1 * 7;
@bytecode
PUSHINT 1;
PUSHINT 7;
MUL;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1 / 7;
@bytecode
PUSHINT 1;
PUSHINT 7;
DIV;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1.0 + 7;
@bytecode
PUSHFLT 1.0;
PUSHINT 7;
ADD;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1.0 - 7;
@bytecode
PUSHFLT 1.0;
PUSHINT 7;
SUB;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1.0 * 7;
@bytecode
PUSHFLT 1.0;
PUSHINT 7;
MUL;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1.0 / 7;
@bytecode
PUSHFLT 1.0;
PUSHINT 7;
DIV;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1 + 7.0;
@bytecode
PUSHINT 1;
PUSHFLT 7.0;
ADD;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1 - 7.0;
@bytecode
PUSHINT 1;
PUSHFLT 7.0;
SUB;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1 * 7.0;
@bytecode
PUSHINT 1;
PUSHFLT 7.0;
MUL;
POP 1;
EXIT;
@@ -0,0 +1,13 @@
@type [compiler]
@source
1 / 7.0;
@bytecode
PUSHINT 1;
PUSHFLT 7.0;
DIV;
POP 1;
EXIT;
@@ -0,0 +1,17 @@
@type [compiler]
@source
1 + 2 * 3;
@bytecode
PUSHINT 1;
PUSHINT 2;
PUSHINT 3;
MUL;
ADD;
POP 1;
EXIT;
@@ -0,0 +1,17 @@
@type [compiler]
@source
1 * 2 + 3;
@bytecode
PUSHINT 1;
PUSHINT 2;
MUL;
PUSHINT 3;
ADD;
POP 1;
EXIT;
@@ -0,0 +1,17 @@
@type [compiler]
@source
(1 + 2) * 3;
@bytecode
PUSHINT 1;
PUSHINT 2;
ADD;
PUSHINT 3;
MUL;
POP 1;
EXIT;
@@ -0,0 +1,15 @@
@type [compiler]
@source
1 + (2 * 3);
@bytecode
PUSHINT 1;
PUSHINT 2;
PUSHINT 3;
MUL;
ADD;
POP 1;
EXIT;
@@ -0,0 +1,20 @@
@type [compiler]
@source
1 * 2 * 3 * 4;
@bytecode
PUSHINT 1;
PUSHINT 2;
MUL;
PUSHINT 3;
MUL;
PUSHINT 4;
MUL;
POP 1;
EXIT;
@@ -0,0 +1,17 @@
@type [compiler]
@source
1 * (2 * (3 * 4));
@bytecode
PUSHINT 1;
PUSHINT 2;
PUSHINT 3;
PUSHINT 4;
MUL;
MUL;
MUL;
POP 1;
EXIT;
@@ -0,0 +1,17 @@
@type [compiler]
@source
1 + 2 * 3 + 4;
@bytecode
PUSHINT 1;
PUSHINT 2;
PUSHINT 3;
MUL;
ADD;
PUSHINT 4;
ADD;
POP 1;
EXIT;
@@ -0,0 +1,20 @@
@type [compiler]
@source
1 * 2 + 3 * 4;
@bytecode
PUSHINT 1;
PUSHINT 2;
MUL;
PUSHINT 3;
PUSHINT 4;
MUL;
ADD;
POP 1;
EXIT;
@@ -0,0 +1,24 @@
@type [compiler]
@source
A - B - C;
A - B * C;
@bytecode
PUSHVAR "A";
PUSHVAR "B";
SUB;
PUSHVAR "C";
SUB;
POP 1;
PUSHVAR "A";
PUSHVAR "B";
PUSHVAR "C";
MUL;
SUB;
POP 1;
EXIT;