From 4a6c0fda784e9de346be92185f2f91b72e31f9db Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 26 Jun 2017 13:47:00 +1000 Subject: tests: Auto detect floating point capabilites of the target. The floating-point precision of the target is detected (0, 30, 32 or 64) and only those tests which can run on the target will be run. --- tests/feature_check/float.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/feature_check/float.py (limited to 'tests/feature_check/float.py') 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) -- cgit v1.2.3