Commits

committed 9d0e73e

of course since the tests are not where one expects, somebody made a new file

• Participants
• Parent commits 253569b

File rpython/jit/metainterp/optimizeopt/test/test_intbound.py

` from rpython.jit.metainterp.optimizeopt.intutils import IntBound, IntUpperBound, \`
`      IntLowerBound, IntUnbounded`
`+from rpython.jit.metainterp.optimizeopt.intbounds import next_pow2_m1`
`+`
` from copy import copy`
` import sys`
` from rpython.rlib.rarithmetic import LONG_BIT`
`         for shift_count_bound in (IntBound(7, LONG_BIT), IntBound(-7, 7)):`
`             #assert not b.lshift_bound(shift_count_bound).has_upper`
`             assert not b.rshift_bound(shift_count_bound).has_upper`
`-        `
`-    `
`+`
`+`
` def test_div_bound():`
`     for _, _, b1 in some_bounds():`
`         for _, _, b2 in some_bounds():`
`     assert a.contains(0)`
` `
` `
`-`
` def test_sub_bound():`
`     for _, _, b1 in some_bounds():`
`         for _, _, b2 in some_bounds():`
`     a=bound(2, 4).sub_bound(bound(1, 2))`
`     assert not a.contains(-1)`
`     assert not a.contains(4)`
`+`
`+`
`+def test_next_pow2_m1():`
`+    assert next_pow2_m1(0) == 0`
`+    assert next_pow2_m1(1) == 1`
`+    assert next_pow2_m1(7) == 7`
`+    assert next_pow2_m1(256) == 511`
`+    assert next_pow2_m1(255) == 255`
`+    assert next_pow2_m1(80) == 127`
`+    assert next_pow2_m1((1 << 32) - 5) == (1 << 32) - 1`
`+    assert next_pow2_m1((1 << 64) - 1) == (1 << 64) - 1`

File rpython/jit/metainterp/optimizeopt/test/test_intbounds.py

`-from rpython.jit.metainterp.optimizeopt.intbounds import next_pow2_m1`
`-`
`-`
`-def test_next_pow2_m1():`
`-    assert next_pow2_m1(0) == 0`
`-    assert next_pow2_m1(1) == 1`
`-    assert next_pow2_m1(7) == 7`
`-    assert next_pow2_m1(256) == 511`
`-    assert next_pow2_m1(255) == 255`
`-    assert next_pow2_m1(80) == 127`
`-    assert next_pow2_m1((1 << 32) - 5) == (1 << 32) - 1`
`-    assert next_pow2_m1((1 << 64) - 1) == (1 << 64) - 1`

File rpython/jit/metainterp/optimizeopt/test/test_virtualstate.py

File contents unchanged.