diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_predicate_functions.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_predicate_functions.txt | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/js/scripting-lang/scratch_tests/test_predicate_functions.txt b/js/scripting-lang/scratch_tests/test_predicate_functions.txt deleted file mode 100644 index e1cba80..0000000 --- a/js/scripting-lang/scratch_tests/test_predicate_functions.txt +++ /dev/null @@ -1,35 +0,0 @@ -/* Test predicate functions */ - -/* Test basic predicate functions */ -is_fizzbuzz : n -> (n % 3 = 0) and (n % 5 = 0); -is_fizz : n -> n % 3 = 0; -is_buzz : n -> n % 5 = 0; - -/* Test the functions */ -test1 : is_fizzbuzz 15; -test2 : is_fizz 3; -test3 : is_buzz 5; -test4 : is_fizzbuzz 7; - -..out test1; -..out test2; -..out test3; -..out test4; - -/* Test simple when with boolean */ -simple_test : n -> - when true is - true then "true" - _ then "false"; - -result1 : simple_test 15; -..out result1; - -/* Test function call in when */ -func_test : n -> - when is_fizzbuzz n is - true then "FizzBuzz" - _ then n; - -result2 : func_test 15; -..out result2; \ No newline at end of file |