[pypy-svn] pypy default: Kill the test for division_to_rshift, because it's already tested
arigo
commits-noreply at bitbucket.org
Sat Mar 26 12:23:35 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r42965:c8e4be12f7b1
Date: 2011-03-26 12:23 +0100
http://bitbucket.org/pypy/pypy/changeset/c8e4be12f7b1/
Log: Kill the test for division_to_rshift, because it's already tested
directly in test_optimizeopt.py. Also, it seems that the trace only
contained additions, because the actual divisions were all constant-
folded, so the test was not testing much.
diff --git a/pypy/module/pypyjit/test/test_pypy_c.py b/pypy/module/pypyjit/test/test_pypy_c.py
--- a/pypy/module/pypyjit/test/test_pypy_c.py
+++ b/pypy/module/pypyjit/test/test_pypy_c.py
@@ -1409,39 +1409,7 @@
i += 1
return long(sa)
''', 93, count_debug_merge_point=False, *tests)
-
- def test_division_to_rshift(self):
- avalues = ('a', 'b', 7, -42, 8)
- bvalues = ['b'] + range(-10, 0) + range(1,10)
- code = ''
- a1, b1, res1 = 10, 20, 0
- a2, b2, res2 = 10, -20, 0
- a3, b3, res3 = -10, -20, 0
- def dd(a, b, aval, bval):
- m = {'a': aval, 'b': bval}
- if not isinstance(a, int):
- a=m[a]
- if not isinstance(b, int):
- b=m[b]
- return a/b
- for a in avalues:
- for b in bvalues:
- code += ' sa += %s / %s\n' % (a, b)
- res1 += dd(a, b, a1, b1)
- res2 += dd(a, b, a2, b2)
- res3 += dd(a, b, a3, b3)
- self.run_source('''
- def main(a, b):
- i = sa = 0
- while i < 2000:
-%s
- i += 1
- return sa
- ''' % code, 179, ([a1, b1], 2000 * res1),
- ([a2, b2], 2000 * res2),
- ([a3, b3], 2000 * res3),
- count_debug_merge_point=False)
-
+
def test_mod(self):
avalues = ('a', 'b', 7, -42, 8)
bvalues = ['b'] + range(-10, 0) + range(1,10)
More information about the Pypy-commit
mailing list