Author: Lisandro Dalcin <dalc...@gmail.com>
Branch: 
Changeset: r1579:9642bf799905
Date: 2014-11-21 14:40 +0300
http://bitbucket.org/cffi/cffi/changeset/9642bf799905/

Log:    Fix test for approximate floating point return type

diff --git a/testing/test_verify.py b/testing/test_verify.py
--- a/testing/test_verify.py
+++ b/testing/test_verify.py
@@ -91,13 +91,9 @@
 
 def test_rounding_1():
     ffi = FFI()
-    ffi.cdef("float sin(double x);")
-    lib = ffi.verify('''
-    #include <math.h>
-    static float my_sin(double x) { return (float)sin(x); }
-    #define sin my_sin
-    ''', libraries=lib_m)
-    res = lib.sin(1.23)
+    ffi.cdef("double sinf(float x);")
+    lib = ffi.verify('#include <math.h>', libraries=lib_m)
+    res = lib.sinf(1.23)
     assert res != math.sin(1.23)     # not exact, because of double->float
     assert abs(res - math.sin(1.23)) < 1E-5
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to