Fix up a couple of test changed by unifying control tv first

This commit is contained in:
Dimo
2017-07-26 15:26:59 -07:00
committed by Jakob Stoklund Olesen
parent 7d1a9c7d81
commit a2b60108fd
2 changed files with 8 additions and 7 deletions

View File

@@ -158,7 +158,8 @@ class TypeCheckingBaseTest(TestCase):
self.v8 = Var("v8")
self.v9 = Var("v9")
self.imm0 = Var("imm0")
self.IxN = TypeVar("IxN", "", ints=True, scalars=True, simd=True)
self.IxN_nonscalar = TypeVar("IxN", "", ints=True, scalars=False,
simd=True)
self.TxN = TypeVar("TxN", "", ints=True, bools=True, floats=True,
scalars=False, simd=True)
self.b1 = TypeVar.singleton(b1)
@@ -175,7 +176,7 @@ class TestRTL(TypeCheckingBaseTest):
self.assertEqual(ti_rtl(r, ti),
"On line 1: fail ti on `typeof_v2` <: `1`: " +
"Error: empty type created when unifying " +
"`typeof_v3` and `half_vector(typeof_v3)`")
"`typeof_v2` and `half_vector(typeof_v2)`")
def test_vselect(self):
# type: () -> None
@@ -201,11 +202,11 @@ class TestRTL(TypeCheckingBaseTest):
)
ti = TypeEnv()
typing = ti_rtl(r, ti)
ixn = self.IxN.get_fresh_copy("IxN1")
ixn = self.IxN_nonscalar.get_fresh_copy("IxN1")
txn = self.TxN.get_fresh_copy("TxN1")
check_typing(typing, ({
self.v0: ixn,
self.v1: txn.as_bool(),
self.v1: ixn.as_bool(),
self.v2: ixn,
self.v3: txn,
self.v4: txn,
@@ -470,7 +471,7 @@ class TestXForm(TypeCheckingBaseTest):
assert var_m[v0] == var_m[v2] and \
var_m[v3] == var_m[v4] and\
var_m[v5] == var_m[v3] and\
var_m[v1] == var_m[v5].as_bool() and\
var_m[v1] == var_m[v2].as_bool() and\
var_m[v1].get_typeset() == var_m[v3].as_bool().get_typeset()
check_concrete_typing_xform(var_m, xform)

View File

@@ -153,7 +153,7 @@ class TestRuntimeChecks(TestCase):
def test_vselect_imm(self):
# type: () -> None
ts = TypeSet(lanes=(2, 256), ints=(8, 64))
ts = TypeSet(lanes=(2, 256), ints=True, floats=True, bools=(8, 64))
r = Rtl(
self.v0 << iconst(self.imm0),
self.v1 << icmp(intcc.eq, self.v2, self.v0),
@@ -166,7 +166,7 @@ class TestRuntimeChecks(TestCase):
.format(self.v3.get_typevar().name)
self.check_yo_check(
x, sequence(typeset_check(self.v2, ts),
x, sequence(typeset_check(self.v3, ts),
equiv_check(tv2_exp, tv3_exp)))
def test_reduce_extend(self):