OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [objc/] [execute/] [protocol-isEqual-2.m] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 307 jeremybenn
/* Contributed by Nicola Pero - Fri Jun  4 03:16:17 BST 2004 */
2
/* Test that protocols with different names are different.  */
3
 
4
#include "../../objc-obj-c++-shared/Protocol1.h"
5
 
6
@protocol Foo1
7
- (void)foo1;
8
@end
9
 
10
@protocol Foo2
11
- (void)foo2;
12
@end
13
 
14
int main (void)
15
{
16
#ifdef NEXT_OBJC_USE_NEW_INTERFACE
17
  if (protocol_isEqual (@protocol(Foo1), @protocol(Foo2)))
18
#else
19
  if ([@protocol(Foo1) isEqual: @protocol(Foo2)])
20
#endif
21
    {
22
      abort ();
23
    }
24
 
25
  return 0;
26
}
27
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.