[pypy-commit] cffi default: Adapt the tests for pypy
arigo
noreply at buildbot.pypy.org
Wed Aug 1 13:15:24 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r756:658184aad459
Date: 2012-08-01 13:15 +0200
http://bitbucket.org/cffi/cffi/changeset/658184aad459/
Log: Adapt the tests for pypy
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -4069,7 +4069,10 @@
static long double _testfunc19(long double x)
{
- return x + x;
+ int i;
+ for (i=0; i<28; i++)
+ x += x;
+ return x;
}
static PyObject *b__testfunc(PyObject *self, PyObject *args)
diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -1762,10 +1762,11 @@
#
BFunc19 = new_function_type((BLongDouble,), BLongDouble)
f = cast(BFunc19, _testfunc(19))
- start = 1
- for i in range(2999):
+ start = 8
+ for i in range(107):
start = f(start)
if sizeof(BLongDouble) > sizeof(new_primitive_type("double")):
+ if 'PY_DOT_PY' in globals(): py.test.skip('py.py: long double->double')
assert repr(start).startswith("<cdata 'long double' 6.15")
assert repr(start).endswith("E+902>")
#
More information about the pypy-commit
mailing list