def test_index_var_basic(self): b = FakeBox() i = IndexVar(b, 1, 1, 0) j = IndexVar(b, 1, 1, 0) assert i.is_identity() assert i.same_variable(j) assert i.constant_diff(j) == 0
def test_index_var_basic(self): b = FakeBox() i = IndexVar(b,1,1,0) j = IndexVar(b,1,1,0) assert i.is_identity() assert i.same_variable(j) assert i.constant_diff(j) == 0
def test_index_var_diff(self): b = FakeBox() i = IndexVar(b, 4, 2, 0) j = IndexVar(b, 1, 1, 1) assert not i.is_identity() assert not j.is_identity() assert not i.same_mulfactor(j) assert i.constant_diff(j) == -1
def test_index_var_diff(self): b = FakeBox() i = IndexVar(b,4,2,0) j = IndexVar(b,1,1,1) assert not i.is_identity() assert not j.is_identity() assert not i.same_mulfactor(j) assert i.constant_diff(j) == -1