aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/objc/execute/protocol-isEqual-1.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/objc/execute/protocol-isEqual-1.m')
-rw-r--r--gcc-4.9/gcc/testsuite/objc/execute/protocol-isEqual-1.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/objc/execute/protocol-isEqual-1.m b/gcc-4.9/gcc/testsuite/objc/execute/protocol-isEqual-1.m
new file mode 100644
index 000000000..b928337aa
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/objc/execute/protocol-isEqual-1.m
@@ -0,0 +1,21 @@
+/* Contributed by Nicola Pero - Fri Jun 4 03:16:17 BST 2004 */
+/* Test that a protocol is equal to itself. */
+#include <objc/Protocol.h>
+#include "../../objc-obj-c++-shared/runtime.h"
+
+@protocol Foo
+- (void)foo;
+@end
+
+int main (void)
+{
+ Protocol *protocol = @protocol(Foo);
+
+ if (!protocol_isEqual (protocol, protocol))
+ {
+ abort ();
+ }
+
+ return 0;
+}
+