diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_complex_expr_debug.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_complex_expr_debug.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_complex_expr_debug.txt b/js/scripting-lang/scratch_tests/test_complex_expr_debug.txt new file mode 100644 index 0000000..0ca7265 --- /dev/null +++ b/js/scripting-lang/scratch_tests/test_complex_expr_debug.txt @@ -0,0 +1,16 @@ +/* Test complex expression in multi-value pattern */ + +/* Test the complex expression directly */ +test_expr : age -> age >= 0 and age <= 120; + +/* Test with complex expression */ +validate_user : name age -> + when (name != "") (test_expr age) is + true true then "valid user" + true false then "invalid age" + false true then "invalid name" + false false then "invalid user"; + +/* Test user validation */ +valid_user : validate_user "Alice" 30; +..out valid_user; \ No newline at end of file |