def test_logical_block_neighbors(self): block = clique_block() block.logical_location = [1, 1] neighbors = block.get_location_neighbors(3) assertion.eq(4, len(neighbors)) assertion.true([0, 1] in neighbors) assertion.true([2, 1] in neighbors) assertion.true([1, 0] in neighbors) assertion.true([1, 2] in neighbors)
def test_logical_block_neighbors(self): block = clique_block() block.logical_location = [1, 1] neighbors = block.get_location_neighbors(3) assertion.eq(4, len(neighbors)) assertion.true([0, 1] in neighbors) assertion.true([2, 1] in neighbors) assertion.true([1, 0] in neighbors) assertion.true([1, 2] in neighbors)
def test_logical_block_neighbors_on_edge(self): block = clique_block() block.logical_location = [1, 1] neighbors = block.get_location_neighbors(2) assertion.eq(2, len(neighbors)) assertion.true([0, 1] in neighbors) assertion.true([1, 0] in neighbors) block.logical_location = [0, 0] neighbors = block.get_location_neighbors(2) assertion.eq(2, len(neighbors)) assertion.true([0, 1] in neighbors) assertion.true([1, 0] in neighbors)
def test_logical_block_neighbors_on_edge(self): block = clique_block() block.logical_location = [1, 1] neighbors = block.get_location_neighbors(2) assertion.eq(2, len(neighbors)) assertion.true([0, 1] in neighbors) assertion.true([1, 0] in neighbors) block.logical_location = [0, 0] neighbors = block.get_location_neighbors(2) assertion.eq(2, len(neighbors)) assertion.true([0, 1] in neighbors) assertion.true([1, 0] in neighbors)