[pypy-svn] r46008 - pypy/branch/pypy-more-rtti-inprogress/rpython/lltypesystem/test
fijal at codespeak.net
fijal at codespeak.net
Mon Aug 27 10:29:43 CEST 2007
Author: fijal
Date: Mon Aug 27 10:29:43 2007
New Revision: 46008
Modified:
pypy/branch/pypy-more-rtti-inprogress/rpython/lltypesystem/test/test_rffi.py
Log:
Be ultra-paranoid with testing
Modified: pypy/branch/pypy-more-rtti-inprogress/rpython/lltypesystem/test/test_rffi.py
==============================================================================
--- pypy/branch/pypy-more-rtti-inprogress/rpython/lltypesystem/test/test_rffi.py (original)
+++ pypy/branch/pypy-more-rtti-inprogress/rpython/lltypesystem/test/test_rffi.py Mon Aug 27 10:29:43 2007
@@ -310,13 +310,13 @@
assert interpret(f, []) == 3
def test_implicit_cast():
- z = llexternal('z', [USHORT, ULONG, USHORT], USHORT)
+ z = llexternal('z', [USHORT, ULONG, USHORT, DOUBLE], USHORT)
- def f(x, y, xx):
- return z(x, y, xx)
+ def f(x, y, xx, yy):
+ return z(x, y, xx, yy)
a = RPythonAnnotator()
- r = a.build_types(f, [int, int, int])
+ r = a.build_types(f, [int, int, int, int])
rtyper = RPythonTyper(a)
rtyper.specialize()
a.translator.rtyper = rtyper
@@ -326,5 +326,6 @@
graph = graphof(a.translator, f)
s = summary(graph)
# there should be not too many operations here by now
- assert s == {'cast_int_to_uint': 1, 'direct_call': 1, 'cast_primitive': 2}
+ assert s == {'cast_int_to_uint': 1, 'direct_call': 1, 'cast_primitive': 2,
+ 'cast_int_to_float': 1}
More information about the Pypy-commit
mailing list