mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
45 lines
800 B
Plaintext
45 lines
800 B
Plaintext
@import <Foundation/CPObject.j>
|
|
|
|
@implementation CPObjectTest : OJTestCase
|
|
{
|
|
}
|
|
|
|
- (void)testImplementsSelector
|
|
{
|
|
var receiver = [[Receiver alloc] init];
|
|
|
|
[self assertTrue:[receiver implementsSelector:@selector(implementedInReceiverAndSuper)]];
|
|
[self assertTrue:[receiver implementsSelector:@selector(implementedInReceiverOnly)]];
|
|
|
|
[self assertFalse:[receiver implementsSelector:@selector(implementedInSuperOnly)]];
|
|
[self assertFalse:[receiver implementsSelector:@selector(notImplementedInSuperNorReceiver)]];
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation SuperReceiver : CPObject
|
|
{
|
|
}
|
|
|
|
- (void)implementedInReceiverAndSuper
|
|
{
|
|
}
|
|
|
|
- (void)implementedInSuperOnly
|
|
{
|
|
}
|
|
@end
|
|
|
|
@implementation Receiver : SuperReceiver
|
|
{
|
|
}
|
|
|
|
- (void)implementedInReceiverAndSuper
|
|
{
|
|
}
|
|
|
|
- (void)implementedInReceiverOnly
|
|
{
|
|
}
|
|
@end
|