mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-14 18:53:50 +00:00
Test for previous commit
This commit is contained in:
1 parent
3a716c08f8
commit
ce0ddb2e1f
1 file changed
+18
@@ -15,6 +15,24 @@
|
||||
[self assertFalse:[receiver implementsSelector:@selector(notImplementedInSuperNorReceiver)]];
|
||||
}
|
||||
|
||||
- (void)testVersion
|
||||
{
|
||||
// zero by default
|
||||
[self assert:[CPObject version] equals:0];
|
||||
|
||||
// create a random new version and round it to an integer
|
||||
var newVersion = ROUND(RAND()*100);
|
||||
|
||||
// make sure it's not zero
|
||||
while (newVersion == 0)
|
||||
newVersion = ROUND(RAND()*100);
|
||||
|
||||
[CPObject setVersion:newVersion];
|
||||
|
||||
// test to make sure the assignment worked
|
||||
[self assert:[CPObject version] equals:newVersion];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation SuperReceiver : CPObject
|
||||
|
||||
Reference in new issue
Block a user