test updates woooo
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
(* type string : 1 -> character *)
|
||||
type M : string -> integer
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
type M : string -> integer
|
||||
|
||||
function entry : M
|
||||
|
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
type M : string -> integer
|
||||
function entry : M
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
type M : string -> integer
|
||||
|
||||
function entry : M
|
||||
|
11
tests/given/test/error.entry.undeclaredType.alpha
Normal file
11
tests/given/test/error.entry.undeclaredType.alpha
Normal file
@ -0,0 +1,11 @@
|
||||
(* TEST: [-asc -tc] *)
|
||||
type M : string -> integer
|
||||
|
||||
function foo : M
|
||||
|
||||
foo (s) := {
|
||||
[
|
||||
int: x
|
||||
]
|
||||
return 0;
|
||||
}
|
8
tests/given/test/error.entry.undeclaredVar.alpha
Normal file
8
tests/given/test/error.entry.undeclaredVar.alpha
Normal file
@ -0,0 +1,8 @@
|
||||
(* TEST: [-asc -tc] *)
|
||||
type M : string -> integer
|
||||
|
||||
function entry : M
|
||||
|
||||
entry(s) := {
|
||||
return x;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
type string2int: string -> integer
|
||||
|
||||
function entry : string2int
|
||||
|
15
tests/given/test/error.operator.alpha
Normal file
15
tests/given/test/error.operator.alpha
Normal file
@ -0,0 +1,15 @@
|
||||
(* TEST: [-asc -tc] *)
|
||||
type string2int: string -> integer
|
||||
|
||||
function entry : string2int
|
||||
|
||||
entry(arg) := {
|
||||
[ integer: i; integer: sum ]
|
||||
sum := 0;
|
||||
i := 0;
|
||||
while (i < 10) {
|
||||
sum = sum + i;
|
||||
i := i + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
type M : integer -> integer
|
||||
|
||||
function f : M
|
||||
|
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
type M : integer -> integer
|
||||
|
||||
function f : M
|
||||
|
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
(* Type definitions *)
|
||||
|
||||
(* mapping type *)
|
||||
@ -29,7 +29,6 @@ function c: string2int_2_integer
|
||||
function d: iic2b
|
||||
|
||||
d(x,y,z) := {
|
||||
[string: s;integer: s]
|
||||
return (x < y & z < 'm');
|
||||
}
|
||||
|
||||
@ -58,11 +57,11 @@ c(x) := {
|
||||
entry is the first function called
|
||||
*)
|
||||
entry(arg) := {
|
||||
[integer: result; string2int: f; integer: temp; character: char]
|
||||
[integer: result; string2int: f; integer: temp]
|
||||
temp := a("Hello");
|
||||
f := b(temp);
|
||||
result := c(f);
|
||||
if (d(1,2,char))
|
||||
if (d(1,2,'c'))
|
||||
then {
|
||||
result := 0;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
|
||||
(* Type definitions *)
|
||||
type int2int: integer -> integer
|
||||
type string2int: string -> integer
|
||||
|
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
(* Type definitions *)
|
||||
|
||||
type string2int: string -> integer
|
||||
@ -46,9 +46,9 @@ selectionSort(data) := {
|
||||
data(i) := temp;
|
||||
i := i + 1;
|
||||
}
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
(* Function definition
|
||||
entry is the first function called
|
||||
|
@ -1,2 +1,2 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
type A : 1 -> integer
|
||||
|
@ -1,3 +1,3 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
type M : integer -> character
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
type R : [ integer : i ; character : c ]
|
||||
|
@ -1,4 +1,4 @@
|
||||
$$ TEST: [-asc -tc]
|
||||
(* TEST: [-asc -tc] *)
|
||||
(*
|
||||
|
||||
At compiler start-up your program should
|
||||
|
Reference in New Issue
Block a user