diff options
Diffstat (limited to 'js/scripting-lang/baba-yaga-c/tests/11_edge_cases.txt')
-rw-r--r-- | js/scripting-lang/baba-yaga-c/tests/11_edge_cases.txt | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/js/scripting-lang/baba-yaga-c/tests/11_edge_cases.txt b/js/scripting-lang/baba-yaga-c/tests/11_edge_cases.txt deleted file mode 100644 index bff51ef..0000000 --- a/js/scripting-lang/baba-yaga-c/tests/11_edge_cases.txt +++ /dev/null @@ -1,50 +0,0 @@ -/* Unit Test: Edge Cases and Error Conditions */ -/* Tests: Unary minus, complex expressions */ - -/* Test unary minus operations */ -negative1 : -5; -negative2 : -3.14; -negative3 : -0; - -..assert negative1 = -5; -..assert negative2 = -3.14; -..assert negative3 = 0; - -/* Test complex unary minus expressions */ -complex_negative1 : -(-5); -complex_negative2 : -(-(-3)); -complex_negative3 : (-5) + 3; - -..assert complex_negative1 = 5; -..assert complex_negative2 = -3; -..assert complex_negative3 = -2; - -/* Test unary minus in function calls */ -abs : x -> when x is - x < 0 then -x - _ then x; - -abs1 : abs (-5); -abs2 : abs 5; - -..assert abs1 = 5; -..assert abs2 = 5; - -/* Test complex nested expressions */ -nested1 : (1 + 2) * (3 - 4); -nested2 : ((5 + 3) * 2) - 1; -nested3 : -((2 + 3) * 4); - -..assert nested1 = -3; -..assert nested2 = 15; -..assert nested3 = -20; - -/* Test unary minus with function references */ -myNegate : x -> -x; -negated1 : myNegate 5; -negated2 : myNegate (-3); - -..assert negated1 = -5; -..assert negated2 = 3; - -..out "Edge cases test completed"; \ No newline at end of file |