diff options
Diffstat (limited to 'tests/basic/test_basics.zc')
| -rw-r--r-- | tests/basic/test_basics.zc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/basic/test_basics.zc b/tests/basic/test_basics.zc index d54389b..57dbb4e 100644 --- a/tests/basic/test_basics.zc +++ b/tests/basic/test_basics.zc @@ -8,3 +8,17 @@ test "test_vars" { var y: int = 20; println "Sum: {x + y}"; } + +fn take_const_arg(x: const int) -> int { + return x; +} + +test "test_const_args" { + var x = take_const_arg(10); + assert(x == 10, "Failed const arg"); + + var y: const int = 20; + assert(y == 20, "Failed const var"); + + println "Const args work!"; +} |
