summaryrefslogtreecommitdiff
path: root/tests/feature_check
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2017-08-28 13:59:26 -0700
committerGitHub <noreply@github.com>2017-08-28 13:59:26 -0700
commit447a4b1ecd5655357c9daaace03b91355d2e2c6d (patch)
tree46ca08a93e9870aab4fbb533843f3c99796cbdf4 /tests/feature_check
parent4e63d55d8d0df6d7600bb684fa90a8cb54708ba8 (diff)
parentc679c80c710fd4a0e37ad87200d8a721e19727aa (diff)
Merge pull request #208 from adafruit/merge-v1.9.2
Merge MicroPython v1.9.2
Diffstat (limited to 'tests/feature_check')
-rw-r--r--tests/feature_check/float.py13
-rw-r--r--tests/feature_check/float.py.exp1
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/feature_check/float.py b/tests/feature_check/float.py
new file mode 100644
index 000000000..af93f5976
--- /dev/null
+++ b/tests/feature_check/float.py
@@ -0,0 +1,13 @@
+# detect how many bits of precision the floating point implementation has
+
+try:
+ float
+except NameError:
+ print(0)
+else:
+ if float('1.0000001') == float('1.0'):
+ print(30)
+ elif float('1e300') == float('inf'):
+ print(32)
+ else:
+ print(64)
diff --git a/tests/feature_check/float.py.exp b/tests/feature_check/float.py.exp
new file mode 100644
index 000000000..900731ffd
--- /dev/null
+++ b/tests/feature_check/float.py.exp
@@ -0,0 +1 @@
+64