예제 #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
예제 #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
예제 #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
예제 #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