update
This commit is contained in:
@ -31,6 +31,9 @@ test (arg) := {
|
||||
b := b & 1;
|
||||
b := 1 & b;
|
||||
b := 1 = 1;
|
||||
|
||||
|
||||
|
||||
b := 1 = b;
|
||||
|
||||
return 0;
|
||||
|
23
tests/sprint3/test/sp3_primitive_type_check.alpha
Normal file
23
tests/sprint3/test/sp3_primitive_type_check.alpha
Normal file
@ -0,0 +1,23 @@
|
||||
(*
|
||||
Testing the following type checks:
|
||||
- integer : primitive
|
||||
- character : primitive
|
||||
- boolean : primitive
|
||||
|
||||
- address (not included, special case)
|
||||
*)
|
||||
|
||||
|
||||
|
||||
type main: string -> integer
|
||||
function entry: main
|
||||
|
||||
entry (arg) := {
|
||||
[integer: i; address: add; character: char; Boolean: bool]
|
||||
|
||||
i := 3 + 2 * 8;
|
||||
char := 'a';
|
||||
bool := true;
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user