[pypy-svn] pypy default: ok, I managed to turn this into a failing test
antocuni
commits-noreply at bitbucket.org
Fri Apr 22 12:15:14 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r43530:9e324d398a15
Date: 2011-04-22 12:14 +0200
http://bitbucket.org/pypy/pypy/changeset/9e324d398a15/
Log: ok, I managed to turn this into a failing test
diff --git a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
--- a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
@@ -1589,16 +1589,18 @@
assert loop.match_by_id('lshift', "") # guard optimized away
def test_lshift_and_then_rshift(self):
- def main(a, b):
+ py.test.skip('fixme, this optimization is disabled')
+ def main(b):
res = 0
+ a = 0
while res < 300:
- assert 0 <= a <= 10
+ assert a >= 0
assert 0 <= b <= 10
- val = (a << b) >> b # ID: shift
- res += val
+ res = (a << b) >> b # ID: shift
+ a += 1
return res
#
- log = self.run(main, [1, 2], threshold=200)
+ log = self.run(main, [2], threshold=200)
assert log.result == 300
loop, = log.loops_by_filename(self.filepath)
assert loop.match_by_id('shift', "") # optimized away
More information about the Pypy-commit
mailing list