1 #include <CoreFoundation/CoreFoundation.h>
2 #include <objc/runtime.h>
8 // rdar://6164781 setAssociatedObject on pure-CF object crashes LP64
11 CFArrayRef array = CFArrayCreate(0, 0, 0, 0);
14 testassert(! objc_getClass("NSCFArray"));
16 objc_setAssociatedObject((id)array, (void*)1, (id)array, OBJC_ASSOCIATION_ASSIGN);
18 obj = objc_getAssociatedObject((id)array, (void*)1);
19 testassert(obj == (id)array);