mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-10 15:04:59 +00:00
Tests for $(float)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
discard """
|
||||
output: "5.0000000000000000e+00"
|
||||
output: "5.0"
|
||||
"""
|
||||
|
||||
type
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
discard """
|
||||
output: '''108
|
||||
11 -1 1936
|
||||
4.0000000000000002e-01
|
||||
0.4
|
||||
true
|
||||
truefalse'''
|
||||
"""
|
||||
|
||||
22
tests/system/tfloatToString.nim
Normal file
22
tests/system/tfloatToString.nim
Normal file
@@ -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))
|
||||
Reference in New Issue
Block a user