aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/fail_compilation/while_condition.elna2
-rw-r--r--testsuite/runnable/slice_cast.elna6
2 files changed, 7 insertions, 1 deletions
diff --git a/testsuite/fail_compilation/while_condition.elna b/testsuite/fail_compilation/while_condition.elna
index 73fed95..1e17489 100644
--- a/testsuite/fail_compilation/while_condition.elna
+++ b/testsuite/fail_compilation/while_condition.elna
@@ -1,4 +1,4 @@
begin
- while 1 do (* @Error Condition must be a boolean, got 'Int' *)
+ while 1 do (* @Error Condition must be a boolean expression, but got 'Int' *)
end
end.
diff --git a/testsuite/runnable/slice_cast.elna b/testsuite/runnable/slice_cast.elna
new file mode 100644
index 0000000..5ab2c93
--- /dev/null
+++ b/testsuite/runnable/slice_cast.elna
@@ -0,0 +1,6 @@
+var
+ ints: [4]Int := [4]Int{ 1, 2, 3, 4 }
+
+begin
+ assert(cast(ints[1u to 4u]: []Char).length = #size(Int) * ints.length)
+end.