Created
December 11, 2011 14:59
-
-
Save YoniTsafir/1460995 to your computer and use it in GitHub Desktop.
Negative value SPTween bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <SenTestingKit/SenTestingKit.h> | |
@interface MyTest : SenTestCase | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "MyTest.h" | |
#import "Sparrow.h" | |
@interface MyTest() | |
@property (nonatomic) int testProp; | |
@end | |
@implementation JTFinalScorePaneTest | |
@synthesize testProp; | |
- (void)testSpTween | |
{ | |
self.testProp = 100; | |
SPStage *fakeStage = [[[SPStage alloc] initWithWidth:0 height:0] autorelease]; | |
SPTween *testedTween = [SPTween tweenWithTarget:self time:1]; | |
[testedTween animateProperty:@"testProp" targetValue:-100]; | |
[fakeStage.juggler addObject:testedTween]; | |
[fakeStage.juggler advanceTime:1]; | |
STAssertEquals(self.testProp, -100, @"tween didn't finish although time has passed"); // fails - actual value is '-99' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment