From 64dc925c4afad63bc5c8a6017d969abbab1d2ac5 Mon Sep 17 00:00:00 2001 From: Rami Ali Date: Thu, 5 Jan 2017 11:06:12 +1100 Subject: tests/float: Improve formatfloat.c test coverage using Python. --- tests/float/string_format_modulo3.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/float/string_format_modulo3.py (limited to 'tests/float/string_format_modulo3.py') diff --git a/tests/float/string_format_modulo3.py b/tests/float/string_format_modulo3.py new file mode 100644 index 0000000000..5639647865 --- /dev/null +++ b/tests/float/string_format_modulo3.py @@ -0,0 +1,4 @@ +# uPy and CPython outputs differ for the following +print("%.1g" % -9.9) # round up 'g' with '-' sign +print("%.1e" % 9.99) # round up with positive exponent +print("%.1e" % 0.999) # round up with negative exponent -- cgit v1.2.3