mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-15 11:13:50 +00:00
Fix CPSubclassableDictionaryTest.
Reviewed by me.
This commit is contained in:
1 parent
378df68995
commit
38dc125fc2
1 file changed
+6
-11
@@ -2,12 +2,7 @@
|
||||
|
||||
@implementation MyDict : CPDictionary
|
||||
{
|
||||
int a;
|
||||
}
|
||||
|
||||
+ (id)alloc
|
||||
{
|
||||
return class_createInstance(self);
|
||||
CPString _firstName;
|
||||
}
|
||||
|
||||
- (id)init
|
||||
@@ -15,7 +10,7 @@
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
_a = "Bob";
|
||||
_firstName = "Bob";
|
||||
|
||||
return self;
|
||||
}
|
||||
@@ -27,13 +22,13 @@
|
||||
|
||||
- (CPString)name
|
||||
{
|
||||
return _a;
|
||||
return _firstName;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation TestSubclassableDictionary : OJTestCase
|
||||
@implementation CPSubclassableDictionaryTest : OJTestCase
|
||||
|
||||
- (void)testThatMyDictContainsReplacedNameSelector
|
||||
{
|
||||
@@ -53,7 +48,7 @@
|
||||
{
|
||||
var target = [[CPDictionary alloc] init];
|
||||
|
||||
[OJAssert assert:@"Bob" notEqual:[target name]];
|
||||
[OJAssert assert:NO same:[target respondsToSelector:@selector(name)]];
|
||||
}
|
||||
|
||||
- (void)testThatTollFreeDoesNotHaveNewSelector
|
||||
@@ -63,4 +58,4 @@
|
||||
[OJAssert assertThrows:function() { [target secondaryName]; }];
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
Reference in new issue
Block a user