def test_4_by_5():
    link_faces = sgrid.face_at_link((4, 5))

    BAD = sgrid.BAD_INDEX_VALUE

    assert_array_equal(
        link_faces,
        np.array([
            BAD, 0, 1, 2, BAD, BAD, 3, 4, 5, BAD, BAD, 6, 7, 8, BAD, BAD, BAD,
            BAD, BAD, 9, 10, 11, 12, 13, 14, 15, 16, BAD, BAD, BAD, BAD
        ]))
def test_4_by_5():
    link_faces = sgrid.face_at_link((4, 5))

    BAD = sgrid.BAD_INDEX_VALUE

    assert_array_equal(link_faces, np.array([BAD, 0, 1, 2, BAD,
                                             BAD, 3, 4, 5, BAD,
                                             BAD, 6, 7, 8, BAD,
                                             BAD, BAD, BAD, BAD,
                                             9, 10, 11, 12,
                                             13, 14, 15, 16,
                                             BAD, BAD, BAD, BAD]))
def test_with_active_links():
    active_links = sgrid.active_links((4, 5))
    active_links = active_links[:-1]
    link_faces = sgrid.face_at_link((4, 5), actives=active_links)

    BAD = sgrid.BAD_INDEX_VALUE

    assert_array_equal(
        link_faces,
        np.array([
            BAD, 0, 1, 2, BAD, BAD, 3, 4, 5, BAD, BAD, 6, 7, 8, BAD, BAD, BAD,
            BAD, BAD, 9, 10, 11, 12, 13, 14, 15, BAD, BAD, BAD, BAD, BAD
        ]))
def test_with_active_links():
    active_links = sgrid.active_links((4, 5))
    active_links = active_links[:-1]
    link_faces = sgrid.face_at_link((4, 5), actives=active_links)

    BAD = sgrid.BAD_INDEX_VALUE

    assert_array_equal(link_faces, np.array([BAD, 0, 1, 2, BAD,
                                             BAD, 3, 4, 5, BAD,
                                             BAD, 6, 7, 8, BAD,
                                             BAD, BAD, BAD, BAD,
                                             9, 10, 11, 12,
                                             13, 14, 15, BAD,
                                             BAD, BAD, BAD, BAD]))