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
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
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)