diff options
Diffstat (limited to 'testsuite/compilable')
| -rw-r--r-- | testsuite/compilable/const_var_chain.elna | 7 | ||||
| -rw-r--r-- | testsuite/compilable/traits_size.elna | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/compilable/const_var_chain.elna b/testsuite/compilable/const_var_chain.elna new file mode 100644 index 0000000..a6db8c8 --- /dev/null +++ b/testsuite/compilable/const_var_chain.elna @@ -0,0 +1,7 @@ +var + x: const Int := 42 + y: Int := x + +begin + assert(y = 42) +end. diff --git a/testsuite/compilable/traits_size.elna b/testsuite/compilable/traits_size.elna new file mode 100644 index 0000000..523045f --- /dev/null +++ b/testsuite/compilable/traits_size.elna @@ -0,0 +1,12 @@ +var + i: Int := 1 + s: Int := cast(#size(Int): Int) + a: [10]Int + as: Int := cast(#size([10]Int): Int) + p: Int := cast(#size(Pointer): Int) + +begin + assert(s > 0); + assert(as = 10 * cast(#size(Int): Int)); + assert(p > 0) +end. |
