summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorstijn <stinos@zoho.com>2015-05-16 10:54:19 +0200
committerDamien George <damien.p.george@gmail.com>2015-05-17 21:47:11 +0100
commit861670ba2ad6fe575de4a31c95c01070ed900391 (patch)
tree4a62df6a4e95183f472a38ee06c4b8729f2d51c1 /tests
parentf5dd6f7f3707b67acbd1dbfe71cad2b958d5d7be (diff)
downloadmicropython-861670ba2ad6fe575de4a31c95c01070ed900391.tar.gz
micropython-861670ba2ad6fe575de4a31c95c01070ed900391.zip
py: Implement mp_format_float for doubles and use where appropriate
This allows using (almost) the same code for printing floats everywhere, removes the dependency on sprintf and uses just snprintf and applies an msvc-specific fix for snprintf in a single place so nan/inf are now printed correctly.
Diffstat (limited to 'tests')
-rw-r--r--tests/float/float1.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/float/float1.py b/tests/float/float1.py
index f670a63486..935375c476 100644
--- a/tests/float/float1.py
+++ b/tests/float/float1.py
@@ -13,6 +13,7 @@ print(float("1e1"))
print(float("1e+1"))
print(float("1e-1"))
print(float("inf"))
+print(float("-inf"))
print(float("INF"))
print(float("infinity"))
print(float("INFINITY"))