test(tiger): import upstream tests

This commit is contained in:
Bruno BELANYI 2022-06-14 17:30:49 +02:00 committed by Stephan Seitz
parent ef385991b6
commit 6e3f888dc7
16 changed files with 454 additions and 0 deletions

View file

@ -0,0 +1,14 @@
class A {
var a := 12
method method() : int = 1
}
type B = class extends A {
var b := 27
method another_method() = (
print("called");
self.b + self.method()
)
}

View file

@ -0,0 +1,22 @@
(
if
12
then
27
else
42
;
for
i := 12
to
27
do
42
;
while
0
do
break
)

View file

@ -0,0 +1,14 @@
primitive long_parameter_list(
a: int,
b: string,
c: type
)
function f() =
(
long_parameter_list(
1,
"2",
nil
)
)

View file

@ -0,0 +1,10 @@
let
var a := 42
in
(
12;
27;
42
);
a
end

View file

@ -0,0 +1,30 @@
let
type array_of_int = array of int
type record = {
a: int,
b: string,
c: type
}
var a :=
"a string"
in
array[
12
]
;
array_of_int[
27
]
of
42
;
record {
a = 1,
b = "2",
c = nil
}
end