Big testing update
This commit is contained in:
10
tests/sprint4/test/sp4_cg_add.alpha
Normal file
10
tests/sprint4/test/sp4_cg_add.alpha
Normal file
@ -0,0 +1,10 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[integer:x; integer:y]
|
||||
y := 1;
|
||||
x := 3;
|
||||
y := x + y;
|
||||
return y;
|
||||
}
|
10
tests/sprint4/test/sp4_cg_and.alpha
Normal file
10
tests/sprint4/test/sp4_cg_and.alpha
Normal file
@ -0,0 +1,10 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[Boolean:b; Boolean: c; Boolean: d]
|
||||
c := true;
|
||||
d := false;
|
||||
d := c & d;
|
||||
return 1;
|
||||
}
|
10
tests/sprint4/test/sp4_cg_div.alpha
Normal file
10
tests/sprint4/test/sp4_cg_div.alpha
Normal file
@ -0,0 +1,10 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[integer:x; integer:y]
|
||||
y := 1;
|
||||
x := 3;
|
||||
y := x / y;
|
||||
return y;
|
||||
}
|
10
tests/sprint4/test/sp4_cg_equal_to.alpha
Normal file
10
tests/sprint4/test/sp4_cg_equal_to.alpha
Normal file
@ -0,0 +1,10 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[Boolean: b; integer: x; integer: y]
|
||||
x := 1;
|
||||
y := 2;
|
||||
b := x = y;
|
||||
return 1;
|
||||
}
|
10
tests/sprint4/test/sp4_cg_less_than.alpha
Normal file
10
tests/sprint4/test/sp4_cg_less_than.alpha
Normal file
@ -0,0 +1,10 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[Boolean: b; integer: x; integer: y]
|
||||
x := 1;
|
||||
y := 2;
|
||||
b := x < y;
|
||||
return 1;
|
||||
}
|
10
tests/sprint4/test/sp4_cg_mod.alpha
Normal file
10
tests/sprint4/test/sp4_cg_mod.alpha
Normal file
@ -0,0 +1,10 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[integer:x; integer:y]
|
||||
y := 1;
|
||||
x := 3;
|
||||
y := x % y;
|
||||
return y;
|
||||
}
|
10
tests/sprint4/test/sp4_cg_mult.alpha
Normal file
10
tests/sprint4/test/sp4_cg_mult.alpha
Normal file
@ -0,0 +1,10 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[integer:x; integer:y]
|
||||
y := 1;
|
||||
x := 3;
|
||||
y := x * x;
|
||||
return y;
|
||||
}
|
9
tests/sprint4/test/sp4_cg_neg.alpha
Normal file
9
tests/sprint4/test/sp4_cg_neg.alpha
Normal file
@ -0,0 +1,9 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[integer:x; integer:y]
|
||||
x := 3;
|
||||
y := -x;
|
||||
return y;
|
||||
}
|
9
tests/sprint4/test/sp4_cg_not.alpha
Normal file
9
tests/sprint4/test/sp4_cg_not.alpha
Normal file
@ -0,0 +1,9 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[Boolean: c; Boolean: d]
|
||||
c := true;
|
||||
d := !c;
|
||||
return 1;
|
||||
}
|
10
tests/sprint4/test/sp4_cg_or.alpha
Normal file
10
tests/sprint4/test/sp4_cg_or.alpha
Normal file
@ -0,0 +1,10 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[Boolean:b; Boolean: c; Boolean: d]
|
||||
c := true;
|
||||
d := false;
|
||||
d := c | d;
|
||||
return 1;
|
||||
}
|
10
tests/sprint4/test/sp4_cg_sub.alpha
Normal file
10
tests/sprint4/test/sp4_cg_sub.alpha
Normal file
@ -0,0 +1,10 @@
|
||||
type main: integer -> integer
|
||||
function test: main
|
||||
|
||||
test (a) := {
|
||||
[integer:x; integer:y]
|
||||
y := 1;
|
||||
x := 3;
|
||||
y := x - y;
|
||||
return y;
|
||||
}
|
Reference in New Issue
Block a user