diff --git a/Test/PropertyAttributeTest2.m b/Test/PropertyAttributeTest2.m index d7590d9..ebf1632 100644 --- a/Test/PropertyAttributeTest2.m +++ b/Test/PropertyAttributeTest2.m @@ -1,4 +1,5 @@ #if __APPLE__ +// Compile command: clang -o PropertyAttributeTest2 -framework Foundation PropertyAttributeTest2.m #include #include @@ -431,6 +432,10 @@ void structDefault2Setter(id self, SEL _cmd, struct YorkshireTeaStruct* value) { int main(void) { +#if !__has_feature(objc_property_clean_abi) + // report failure because most of these tests will failed + return 1; +#else testProperty("charDefault", "Tc,VcharDefault", ATTRS(ATTR("T", "c"), ATTR("V", "charDefault"))); testProperty("doubleDefault", "Td,VdoubleDefault", ATTRS(ATTR("T", "d"), ATTR("V", "doubleDefault"))); testProperty("enumDefault", "Ti,VenumDefault", ATTRS(ATTR("T", "i"), ATTR("V", "enumDefault"))); @@ -636,6 +641,7 @@ int main(void) t.idRetain = testValue2; assert(t->idRetain == testValue); assert(t->_idOther == testValue2); -#endif +#endif // __APPLE__ return 0; +#endif // __has_feature(objc_property_clean_abi) }