diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_and_parentheses.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_and_parentheses.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_and_parentheses.txt b/js/scripting-lang/scratch_tests/test_and_parentheses.txt new file mode 100644 index 0000000..f799e63 --- /dev/null +++ b/js/scripting-lang/scratch_tests/test_and_parentheses.txt @@ -0,0 +1,13 @@ +/* Test if parentheses can solve the and operator issue */ + +/* Test the complex expression with parentheses */ +test_expr_parens : age -> (age >= 0) and (age <= 120); + +/* Test with different values */ +result1 : test_expr_parens 30; /* Should be true */ +result2 : test_expr_parens 150; /* Should be false */ +result3 : test_expr_parens -5; /* Should be false */ + +..out result1; +..out result2; +..out result3; \ No newline at end of file |