diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_debug_func_call_when.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_debug_func_call_when.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_debug_func_call_when.txt b/js/scripting-lang/scratch_tests/test_debug_func_call_when.txt new file mode 100644 index 0000000..8132d0b --- /dev/null +++ b/js/scripting-lang/scratch_tests/test_debug_func_call_when.txt @@ -0,0 +1,17 @@ +/* Debug test for function calls in when expressions */ +is_even : n -> n % 2 = 0; + +test_debug : n -> + when is_even n is + true then "even" + false then "odd"; + +/* Test the function call separately */ +result1 : is_even 4; +result2 : is_even 5; + +/* Test the when expression */ +result3 : test_debug 4; +..out result1; +..out result2; +..out result3; \ No newline at end of file |