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,15 @@
@type [compiler]
@source
while none:
{}
@bytecode
begin:
PUSHNNE;
JUMPIFNOTANDPOP end;
JUMP begin;
end:
EXIT;
@@ -0,0 +1,20 @@
@type [compiler]
@source
while none:
true;
false;
@bytecode
begin:
PUSHNNE;
JUMPIFNOTANDPOP end;
PUSHTRU;
POP 1;
JUMP begin;
end:
PUSHFLS;
POP 1;
EXIT;
@@ -0,0 +1,24 @@
@type [compiler]
@source
while none: {
true;
"Hello, world!";
}
false;
@bytecode
begin:
PUSHNNE;
JUMPIFNOTANDPOP end;
PUSHTRU;
POP 1;
PUSHSTR "Hello, world!";
POP 1;
JUMP begin;
end:
PUSHFLS;
POP 1;
EXIT;
@@ -0,0 +1,26 @@
@type [compiler]
@source
while none: {
true;
"Hello, world!";
break;
}
false;
@bytecode
begin:
PUSHNNE;
JUMPIFNOTANDPOP end;
PUSHTRU;
POP 1;
PUSHSTR "Hello, world!";
POP 1;
JUMP end;
JUMP begin;
end:
PUSHFLS;
POP 1;
EXIT;
@@ -0,0 +1,19 @@
@type [compiler]
@source
while none:
break;
false;
@bytecode
begin:
PUSHNNE;
JUMPIFNOTANDPOP end;
JUMP end;
JUMP begin;
end:
PUSHFLS;
POP 1;
EXIT;