updated compiler testcases

This commit is contained in:
cozis
2022-12-07 18:45:22 +01:00
parent 98374ee491
commit 60c2d3ea88
6 changed files with 10 additions and 107 deletions
+4 -40
View File
@@ -12,52 +12,16 @@
POP 1;
JUMP end;
fun:
PUSHTYP;
PUSHVAR "bool";
PUSHTYP;
PUSHTYPTYP;
EQL;
JUMPIFNOTANDPOP arg1_annot0_bad;
EQL;
JUMPIFANDPOP arg1_ok;
PUSHTYP;
PUSHVAR "Map";
PUSHTYP;
PUSHTYPTYP;
EQL;
JUMPIFNOTANDPOP arg1_annot1_bad;
EQL;
JUMPIFANDPOP arg1_ok;
ERROR "Bad type for argument 1";
arg1_annot0_bad:
ERROR "Argument 1 type annotation 0 is not a type";
arg1_annot1_bad:
ERROR "Argument 1 type annotation 1 is not a type";
arg1_ok:
STP;
CHECKTYPE 1, "b";
ASS "b";
POP 1;
PUSHTYP;
PUSHVAR "int";
PUSHTYP;
PUSHTYPTYP;
EQL;
JUMPIFNOTANDPOP arg0_annot0_bad;
EQL;
JUMPIFANDPOP arg0_ok;
PUSHTYP;
PUSHVAR "float";
PUSHTYP;
PUSHTYPTYP;
EQL;
JUMPIFNOTANDPOP arg0_annot1_bad;
EQL;
JUMPIFANDPOP arg0_ok;
ERROR "Bad type for argument 0";
arg0_annot0_bad:
ERROR "Argument 0 type annotation 0 is not a type";
arg0_annot1_bad:
ERROR "Argument 0 type annotation 1 is not a type";
arg0_ok:
STP;
CHECKTYPE 0, "a";
ASS "a";
POP 1;
PUSHVAR "a";