diff --git a/Test/ForwardDeclareProtocol.m b/Test/ForwardDeclareProtocol.m index 32ebc41..61fdd88 100644 --- a/Test/ForwardDeclareProtocol.m +++ b/Test/ForwardDeclareProtocol.m @@ -3,5 +3,12 @@ Protocol *getProtocol(void) { +// Don't try to compile this on known-broken compilers. +#if !defined(__clang__) return @protocol(P); +#elif __clang_major__ > 6 + return @protocol(P); +#else + return 0; +#endif } diff --git a/Test/ForwardDeclareProtocolAccess.m b/Test/ForwardDeclareProtocolAccess.m index f8da5e5..5e36399 100644 --- a/Test/ForwardDeclareProtocolAccess.m +++ b/Test/ForwardDeclareProtocolAccess.m @@ -9,9 +9,12 @@ Protocol *getProtocol(void); int main(void) { - //Protocol *p1 = @protocol(P); + Protocol *p1 = @protocol(P); Protocol *p2 = getProtocol(); - //assert(protocol_isEqual(p1, p2)); - //assert(p1 == p2); + assert(protocol_isEqual(p1, p2)); +#ifdef GS_RUNTIME_V2 + // With the new ABI, these should be precisely the same object. + assert(p1 == p2); +#endif return 0; }