aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>2021-02-15 17:05:28 +0100
committerCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>2021-02-15 17:05:28 +0100
commitcbbcebb9ad02b7ee4a1570d2018ef50e7899fc7c (patch)
treefdf4342e9982db901a7ab774435ca3281ab99a04 /rpython/jit/metainterp/optimizeopt/test/test_intbound.py
parentfix type-unsafe test (diff)
downloadpypy-cbbcebb9ad02b7ee4a1570d2018ef50e7899fc7c.tar.gz
pypy-cbbcebb9ad02b7ee4a1570d2018ef50e7899fc7c.tar.bz2
pypy-cbbcebb9ad02b7ee4a1570d2018ef50e7899fc7c.zip
Backed out changeset f1c2880a6b49
(some test fails weirdly, trying to see what caused it)
Diffstat (limited to 'rpython/jit/metainterp/optimizeopt/test/test_intbound.py')
-rw-r--r--rpython/jit/metainterp/optimizeopt/test/test_intbound.py34
1 files changed, 1 insertions, 33 deletions
diff --git a/rpython/jit/metainterp/optimizeopt/test/test_intbound.py b/rpython/jit/metainterp/optimizeopt/test/test_intbound.py
index 6231baa03e..0b782b4e60 100644
--- a/rpython/jit/metainterp/optimizeopt/test/test_intbound.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_intbound.py
@@ -350,15 +350,6 @@ def test_and_bound():
if b1.contains(n1) and b2.contains(n2):
assert b3.contains(n1 & n2)
-def test_or_bound_explicit():
- a = bound(0b10, 0b100)
- b = bound(0, 0b10)
- c = a.or_bound(b)
- assert c.contains(0b10)
- assert c.contains(0b100 | 0b10)
- assert not c.contains(1)
- assert not c.contains(0b111)
-
def test_or_bound():
for _, _, b1 in some_bounds():
for _, _, b2 in some_bounds():
@@ -367,24 +358,7 @@ def test_or_bound():
for n2 in nbr:
if b1.contains(n1) and b2.contains(n2):
assert b3.contains(n1 | n2)
-
-def test_xor_bound_explicit():
- a = bound(0b10, 0b100)
- b = bound(0, 0b10)
- c = a.or_bound(b)
- assert c.contains(0b10)
- assert c.contains(0b100 | 0b10)
- assert not c.contains(-1)
- assert not c.contains(0b111)
-
-def test_xor_bound():
- for _, _, b1 in some_bounds():
- for _, _, b2 in some_bounds():
- b3 = b1.xor_bound(b2)
- for n1 in nbr:
- for n2 in nbr:
- if b1.contains(n1) and b2.contains(n2):
- assert b3.contains(n1 ^ n2)
+ assert b3.contains(n1 ^ n2) # we use it for xor too
def test_next_pow2_m1():
@@ -501,12 +475,6 @@ def test_or_bound_random(t1, t2):
b3 = b1.or_bound(b2)
r = n1 | n2
assert b3.contains(r)
-
-@given(bound_with_contained_number, bound_with_contained_number)
-def test_xor_bound_random(t1, t2):
- b1, n1 = t1
- b2, n2 = t2
- b3 = b1.xor_bound(b2)
r = n1 ^ n2
assert b3.contains(r)