summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tests/matrix/tmatrix2.nim2
-rw-r--r--tests/showoff/tdrdobbs_examples.nim2
-rw-r--r--tests/system/tfloatToString.nim22
3 files changed, 24 insertions, 2 deletions
diff --git a/tests/matrix/tmatrix2.nim b/tests/matrix/tmatrix2.nim
index 442096e93..82990f1a5 100644
--- a/tests/matrix/tmatrix2.nim
+++ b/tests/matrix/tmatrix2.nim
@@ -1,5 +1,5 @@
 discard """
-  output: "5.0000000000000000e+00"
+  output: "5.0"
 """
 
 type
diff --git a/tests/showoff/tdrdobbs_examples.nim b/tests/showoff/tdrdobbs_examples.nim
index 8a39990ba..13a685950 100644
--- a/tests/showoff/tdrdobbs_examples.nim
+++ b/tests/showoff/tdrdobbs_examples.nim
@@ -1,7 +1,7 @@
 discard """
   output: '''108
 11 -1 1936
-4.0000000000000002e-01
+0.4
 true
 truefalse'''
 """
diff --git a/tests/system/tfloatToString.nim b/tests/system/tfloatToString.nim
new file mode 100644
index 000000000..bb45a91d7
--- /dev/null
+++ b/tests/system/tfloatToString.nim
@@ -0,0 +1,22 @@
+discard """
+  output:'''2.3242
+2.982
+123912.1
+123912.1823
+5.0
+1e+100
+inf
+-inf
+nan
+'''
+"""
+
+echo($(2.3242))
+echo($(2.982))
+echo($(123912.1))
+echo($(123912.1823))
+echo($(5.0))
+echo($(1e100))
+echo($(1e1000000))
+echo($(-1e1000000))
+echo($(0.0/0.0))