diff options
Diffstat (limited to 'js/scripting-lang/baba-yaga-c/tests/10_standard_library.txt')
-rw-r--r-- | js/scripting-lang/baba-yaga-c/tests/10_standard_library.txt | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/js/scripting-lang/baba-yaga-c/tests/10_standard_library.txt b/js/scripting-lang/baba-yaga-c/tests/10_standard_library.txt deleted file mode 100644 index 221d5ca..0000000 --- a/js/scripting-lang/baba-yaga-c/tests/10_standard_library.txt +++ /dev/null @@ -1,40 +0,0 @@ -/* Unit Test: Standard Library */ -/* Tests: All built-in higher-order functions */ - -/* Basic functions for testing */ -double_func : x -> x * 2; -square_func : x -> x * x; -add_func : x y -> x + y; -isPositive : x -> x > 0; - -/* Map function */ -mapped1 : map @double_func 5; -mapped2 : map @square_func 3; - -..assert mapped1 = 10; -..assert mapped2 = 9; - -/* Compose function */ -composed : compose @double_func @square_func 3; -..assert composed = 18; - -/* Pipe function */ -piped : pipe @double_func @square_func 2; -..assert piped = 16; - -/* Apply function */ -applied : apply @double_func 7; -..assert applied = 14; - -/* Reduce and Fold functions */ -reduced : reduce @add_func 0 5; -folded : fold @add_func 0 5; - -..assert reduced = 5; -..assert folded = 5; - -/* Curry function */ -curried : curry @add_func 3 4; -..assert curried = 7; - -..out "Standard library test completed"; \ No newline at end of file |