def test_Wconversion_floating():
lib = _Wconversion("float sin(double);",
"#include <math.h>", libraries=lib_m)
res = lib.sin(1.23)
assert res != math.sin(1.23) # not exact, because of double->float
assert abs(res - math.sin(1.23)) < 1E-5
评论列表
文章目录