update tests

This commit is contained in:
Mylloon 2022-12-08 21:30:56 +01:00
parent 6f4eb269de
commit 378b054812
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
10 changed files with 9 additions and 1 deletions

View file

@ -4,7 +4,7 @@ OUTPUT = output
TESTS = $(wildcard $(TESTS_DIR)/*.test)
INDENT = 21
INDENT = 38
main:
ocamlbuild -use-menhir -no-hygiene $(MAIN).byte

1
tests/03_bool.test Normal file
View file

@ -0,0 +1 @@
bool a = true;

View file

@ -0,0 +1 @@
foo = 1312; # Error on line 1 col 4 : unbound variable 'foo'

View file

@ -0,0 +1 @@
int foo = bar; # Error on line 1 col 10: unbound variable 'bar'

View file

@ -0,0 +1,2 @@
int foo;
int bar = foo; # Warning on line 2 col 10 : unassigned variable 'foo'

View file

@ -0,0 +1 @@
int foo = true; # Error on line 1 col 10: expected int but given bool

View file

@ -0,0 +1,2 @@
int foo = 1312;
bool bar = foo; # Error on line 2 col 11: expected bool but given int