Exemplo n.º 1
0
def test22():
    m = make_matrix(2, 2)
    assert print_matrix_clockwisely(m) == [1, 2, 4, 3]
Exemplo n.º 2
0
def test00():
    m = make_matrix(0, 0)
    assert print_matrix_clockwisely(m) == []
Exemplo n.º 3
0
def test35():
    m = make_matrix(3, 5)
    assert print_matrix_clockwisely(m) == [
        1, 2, 3, 4, 5, 10, 15, 14, 13, 12, 11, 6, 7, 8, 9
    ]
Exemplo n.º 4
0
def test45():
    m = make_matrix(4, 5)
    assert print_matrix_clockwisely(m) == [
        1, 2, 3, 4, 5, 10, 15, 20, 19, 18, 17, 16, 11, 6, 7, 8, 9, 14, 13, 12
    ]
Exemplo n.º 5
0
def test15():
    m = make_matrix(1, 5)
    assert print_matrix_clockwisely(m) == [1, 2, 3, 4, 5]
Exemplo n.º 6
0
def test25():
    m = make_matrix(2, 5)
    assert print_matrix_clockwisely(m) == [1, 2, 3, 4, 5, 10, 9, 8, 7, 6]
Exemplo n.º 7
0
def test53():
    m = make_matrix(5, 3)
    assert print_matrix_clockwisely(m) == [
        1, 2, 3, 6, 9, 12, 15, 14, 13, 10, 7, 4, 5, 8, 11
    ]
Exemplo n.º 8
0
def test54():
    m = make_matrix(5, 4)
    assert print_matrix_clockwisely(m) == [
        1, 2, 3, 4, 8, 12, 16, 20, 19, 18, 17, 13, 9, 5, 6, 7, 11, 15, 14, 10
    ]
Exemplo n.º 9
0
def test52():
    m = make_matrix(5, 2)
    assert print_matrix_clockwisely(m) == [1, 2, 4, 6, 8, 10, 9, 7, 5, 3]
Exemplo n.º 10
0
def test11():
    m = make_matrix(1, 1)
    assert print_matrix_clockwisely(m) == [1]
Exemplo n.º 11
0
def test51():
    m = make_matrix(5, 1)
    assert print_matrix_clockwisely(m) == [1, 2, 3, 4, 5]
Exemplo n.º 12
0
def test55():
    m = make_matrix(5, 5)
    assert print_matrix_clockwisely(m) == [
        1, 2, 3, 4, 5, 10, 15, 20, 25, 24, 23, 22, 21, 16, 11, 6, 7, 8, 9, 14,
        19, 18, 17, 12, 13
    ]
Exemplo n.º 13
0
def test44():
    m = make_matrix(4, 4)
    assert print_matrix_clockwisely(m) == [
        1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5, 6, 7, 11, 10
    ]