diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_func_call_debug.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_func_call_debug.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_func_call_debug.txt b/js/scripting-lang/scratch_tests/test_func_call_debug.txt new file mode 100644 index 0000000..33f39a7 --- /dev/null +++ b/js/scripting-lang/scratch_tests/test_func_call_debug.txt @@ -0,0 +1,22 @@ +/* Debug test for function call evaluation */ +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 with explicit boolean comparison */ +test_explicit : n -> + when (is_even n = true) is + true then "even" + false then "odd"; + +result3 : test_explicit 4; +..out result1; +..out result2; +..out result3; \ No newline at end of file |