From 36081df32715421e21359c4ffbb5a02e4bc32a26 Mon Sep 17 00:00:00 2001 From: Pratik Mota Date: Sun, 12 May 2024 16:44:24 +0530 Subject: [PATCH] adding test cases --- tests/misc.rye | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/misc.rye b/tests/misc.rye index 848ab0b3..315bee89 100644 --- a/tests/misc.rye +++ b/tests/misc.rye @@ -413,6 +413,23 @@ section "Math functions" equal { do\in math { cbrt 27 } } 3.000000 equal { do\in math { cbrt 12.3 } } 2.308350239753609 } + + group "copysign" + mold\nowrap "" + { { string } } + { + equal { do\in math { copysign 4.9 -1 } } -4.9 + equal { do\in math { copysign 4.9 1 } } 4.9 + } + + group "dim" + mold\nowrap "" + { { string } } + { + equal { do\in math { dim 2 -3 } } 5.000000 + equal { do\in math { dim 8 -1 } } 9.000000 + equal { do\in math { dim -4 -2 } } 0.000000 + } }