OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc/] [execute/] [protocol-isEqual-4.m] - Blame information for rev 702

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 702 jeremybenn
/* Contributed by David Ayers - Fri Jun  4 03:16:17 BST 2004 */
2
/* Test that a protocol is not equal to something which is not a protocol.  */
3
#include "../../objc-obj-c++-shared/runtime.h"
4
#include <objc/Protocol.h>
5
 
6
@protocol Foo
7
- (void)foo;
8
@end
9
 
10
int main (void)
11
{
12
  /* A Protocol object should not be equal to a Class object.  */
13
  if (protocol_isEqual (@protocol(Foo), (id)objc_getClass("Protocol")))
14
    {
15
      abort ();
16
    }
17
 
18
  return 0;
19
}
20
 

powered by: WebSVN 2.1.0

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