$(a: float) now works consistently in nim js, avoiding printing floats as ints (#14134)
* fix https://github.com/timotheecour/Nim/issues/133; $(a: float) works in nim js like in other backends * fix tests * fix test for windows that prints 1.1e17 differently than other OS
This commit is contained in:
parent
664cb2c0be
commit
bb982c644b
4 changed files with 90 additions and 11 deletions
|
|
@ -1,15 +1,16 @@
|
|||
discard """
|
||||
output: '''foo 12
|
||||
output: '''
|
||||
foo 12
|
||||
bar 12
|
||||
2
|
||||
foo 12
|
||||
bar 12
|
||||
2
|
||||
12.5
|
||||
(nums: @[5, 5, 10, 5, 5, 5, 5, 5, 5, 5])
|
||||
(nums: @[5, 5, 50, 5, 5, 5, 5, 5, 5, 5])
|
||||
(nums: @[5, 5, 45, 5, 5, 5, 5, 5, 5, 5])
|
||||
(nums: @[5, 5, 9, 5, 5, 5, 5, 5, 5, 5])
|
||||
(nums: @[5.0, 5.0, 10.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0])
|
||||
(nums: @[5.0, 5.0, 50.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0])
|
||||
(nums: @[5.0, 5.0, 45.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0])
|
||||
(nums: @[5.0, 5.0, 9.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0])
|
||||
asd
|
||||
'''
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue