Exemplo n.º 1
0
def test_copy():
    x = IntArray()
    for i in range(1000):
        iarr.append(x, i)

    y = IntArray()
    for i in range(1000):
        iarr.append(y, 1000 - i)

    iarr.copy(x, y)

    assert iarr.get(y, 0) == 0
Exemplo n.º 2
0
def test_copy():
    x = IntArray()
    for i in range(1000):
        iarr.append(x, i)

    y = IntArray()
    for i in range(1000):
        iarr.append(y, 1000 - i)

    iarr.copy(x, y)

    assert iarr.get(y, 0) == 0
Exemplo n.º 3
0
def test_from_list():
    x = IntArray()
    iarr.from_list(x, range(15))
    assert iarr.get(x, 0) == 0
    assert iarr.get(x, 14) == 14
Exemplo n.º 4
0
def test_from_list():
    x = IntArray()
    iarr.from_list(x, range(15))
    assert iarr.get(x, 0) == 0
    assert iarr.get(x, 14) == 14