summary refs log tree commit diff stats
path: root/tests/stdlib/tfrexp1.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib/tfrexp1.nim')
-rw-r--r--tests/stdlib/tfrexp1.nim15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/stdlib/tfrexp1.nim b/tests/stdlib/tfrexp1.nim
index 21ecc7491..aa734ddac 100644
--- a/tests/stdlib/tfrexp1.nim
+++ b/tests/stdlib/tfrexp1.nim
@@ -1,9 +1,10 @@
 discard """
+  matrix: "--mm:refc; --mm:orc"
   targets: "js c cpp"
-  output: '''ok'''
 """
 
-import math
+import std/math
+import std/assertions
 
 const manualTest = false
 
@@ -43,4 +44,12 @@ when manualTest:
 else:
   frexp_test(-200000.0, 200000.0, 0.125)
 
-echo "ok"
+
+doAssert frexp(8.0) == (0.5, 4)
+doAssert frexp(-8.0) == (-0.5, 4)
+doAssert frexp(0.0) == (0.0, 0)
+
+block:
+  var x: int
+  doAssert frexp(5.0, x) == 0.625
+  doAssert x == 3