Tests for $(float)
This commit is contained in:
parent
cea2a9087d
commit
9532951cfc
3 changed files with 24 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
output: "5.0000000000000000e+00"
|
output: "5.0"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
discard """
|
discard """
|
||||||
output: '''108
|
output: '''108
|
||||||
11 -1 1936
|
11 -1 1936
|
||||||
4.0000000000000002e-01
|
0.4
|
||||||
true
|
true
|
||||||
truefalse'''
|
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))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue