[pypy-svn] r18282 - pypy/dist/pypy/translator/c/test
pedronis at codespeak.net
pedronis at codespeak.net
Sat Oct 8 15:34:03 CEST 2005
Author: pedronis
Date: Sat Oct 8 15:33:58 2005
New Revision: 18282
Modified:
pypy/dist/pypy/translator/c/test/test_genc.py
Log:
inf float in struct test
Modified: pypy/dist/pypy/translator/c/test/test_genc.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_genc.py (original)
+++ pypy/dist/pypy/translator/c/test/test_genc.py Sat Oct 8 15:33:58 2005
@@ -216,7 +216,23 @@
f1 = compile(fn, [])
res = f1()
assert res < 0 and res == res / 2
+ class Box:
+ def __init__(self, d):
+ self.d = d
+ b1 = Box(x)
+ b2 = Box(0.0)
+
+ def f(i):
+ if i:
+ b = b1
+ else:
+ b = b2
+ return b.d
+
+ f1 = compile(f, [int])
+ res = f1(1)
+ assert res > 0 and res == res / 2
def test_x():
class A:
More information about the Pypy-commit
mailing list