aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/compilable/compile_time_array_length.elna7
-rw-r--r--testsuite/compilable/const_negation.elna9
-rw-r--r--testsuite/compilable/const_var_chain.elna8
-rw-r--r--testsuite/runnable/case_constant_label.elna7
-rw-r--r--testsuite/runnable/compile_time_array_access.elna8
-rw-r--r--testsuite/runnable/inferred_variable.elna4
6 files changed, 10 insertions, 33 deletions
diff --git a/testsuite/compilable/compile_time_array_length.elna b/testsuite/compilable/compile_time_array_length.elna
deleted file mode 100644
index 9e2c896..0000000
--- a/testsuite/compilable/compile_time_array_length.elna
+++ /dev/null
@@ -1,7 +0,0 @@
-module
-
-var
- source: const [3]Int := [1, 2, 3]
- target: Word := source.length
-
-end.
diff --git a/testsuite/compilable/const_negation.elna b/testsuite/compilable/const_negation.elna
deleted file mode 100644
index 1dd45f4..0000000
--- a/testsuite/compilable/const_negation.elna
+++ /dev/null
@@ -1,9 +0,0 @@
-program()
-var
- x: const Int := -5
- y: const Int := -x
-
-begin
- assert(x = -5);
- assert(y = 5);
-end.
diff --git a/testsuite/compilable/const_var_chain.elna b/testsuite/compilable/const_var_chain.elna
deleted file mode 100644
index 438b79a..0000000
--- a/testsuite/compilable/const_var_chain.elna
+++ /dev/null
@@ -1,8 +0,0 @@
-program()
-var
- x: const Int := 42
- y: Int := x
-
-begin
- assert(y = 42)
-end.
diff --git a/testsuite/runnable/case_constant_label.elna b/testsuite/runnable/case_constant_label.elna
index 1b01736..3f7a483 100644
--- a/testsuite/runnable/case_constant_label.elna
+++ b/testsuite/runnable/case_constant_label.elna
@@ -1,14 +1,15 @@
program()
+const
+ BASE = 2
+ LIMIT = BASE
var
- base: const Int := 2
- limit: const Int := base
x: Int := 2
matched: Bool := false
begin
case x of
1: assert(false)
- | limit: matched := true
+ | LIMIT: matched := true
end;
assert(matched)
end.
diff --git a/testsuite/runnable/compile_time_array_access.elna b/testsuite/runnable/compile_time_array_access.elna
index 5ce10a0..146fd27 100644
--- a/testsuite/runnable/compile_time_array_access.elna
+++ b/testsuite/runnable/compile_time_array_access.elna
@@ -1,8 +1,8 @@
program()
-var
- array: const [3]Int := [1, 2, 3]
- i: const Int := array[2]
+const
+ ARRAY = [1, 2, 3]
+ I = ARRAY[2]
begin
- assert(i = 2)
+ assert(I = 2)
end.
diff --git a/testsuite/runnable/inferred_variable.elna b/testsuite/runnable/inferred_variable.elna
index 48d7414..edc3399 100644
--- a/testsuite/runnable/inferred_variable.elna
+++ b/testsuite/runnable/inferred_variable.elna
@@ -2,8 +2,8 @@ program()
var
x := 42
c: const := 10
- y := c
- arr := [c, 2]
+ y := 10
+ arr := [10, 2]
begin
x := x + 1;