Example #1
0
def test_ctypes_pointers(): # TODO: unifiy with test_llvm_pointers
    # Test pointer conversion
    for typename in typenames:
        ty = getattr(ts, tyname(typename))
        cty = getattr(cts, tyname(typename))
        assert ct(ts.pointer(ty)) == cts.pointer(cty)

    p = ts.pointer(ts.pointer(ts.int_))
    cp = cts.pointer(cts.pointer(cts.int_))

    # See if the conversion works
    assert ct(p) == cp
Example #2
0
def test_llvm_pointers():
    # Test pointer conversion
    for typename in typenames:
        ty = getattr(ts, tyname(typename))
        lty = getattr(lts, tyname(typename))
        assert llvmt(ts.pointer(ty)) == lts.pointer(lty)

    p = ts.pointer(ts.pointer(ts.int_))
    lp = lts.pointer(lts.pointer(lts.int_))

    # See if the conversion works
    assert llvmt(p) == lp
Example #3
0
def test_ctypes_pointers():  # TODO: unifiy with test_llvm_pointers
    # Test pointer conversion
    for typename in typenames:
        ty = getattr(ts, tyname(typename))
        cty = getattr(cts, tyname(typename))
        assert ct(ts.pointer(ty)) == cts.pointer(cty)

    p = ts.pointer(ts.pointer(ts.int_))
    cp = cts.pointer(cts.pointer(cts.int_))

    # See if the conversion works
    assert ct(p) == cp
Example #4
0
def test_llvm_pointers():
    # Test pointer conversion
    for typename in typenames:
        ty = getattr(ts, tyname(typename))
        lty = getattr(lts, tyname(typename))
        assert llvmt(ts.pointer(ty)) == lts.pointer(lty)

    p = ts.pointer(ts.pointer(ts.int_))
    lp = lts.pointer(lts.pointer(lts.int_))

    # See if the conversion works
    assert llvmt(p) == lp
Example #5
0
def test_pointers():
    assert ts.pointer(ts.int_) is ts.pointer(ts.int_)
Example #6
0
def test_pointers():
    assert ts.pointer(ts.int_) is ts.pointer(ts.int_)
def test_pointers():
    p = ts.pointer(ts.pointer(ts.int_))
    assert str(p) == "int **", str(p)
Example #8
0
def test_pointers():
    p = ts.pointer(ts.pointer(ts.int_))
    assert str(p) == "int **", str(p)