Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added issue #1288 test case

  • Loading branch information...
commit 1f68c344fd4a09518f24af42edab46be6cf05d21 1 parent 877aabf
@ricardoquesada ricardoquesada authored
Showing with 42 additions and 0 deletions.
  1. +4 −0 tests/ActionsTest.h
  2. +38 −0 tests/ActionsTest.m
View
4 tests/ActionsTest.h
@@ -153,3 +153,7 @@
@interface Issue1305_2 : ActionDemo
{}
@end
+
+@interface Issue1288 : ActionDemo
+{}
+@end
View
38 tests/ActionsTest.m
@@ -52,6 +52,7 @@
@"Issue1305",
@"Issue1305_2",
+ @"Issue1288",
};
@@ -1268,6 +1269,43 @@ - (void)dealloc {
}
@end
+#pragma mark - Issue1305_2
+
+@implementation Issue1288
+-(void) onEnter
+{
+ [super onEnter];
+
+ [self centerSprites:0];
+
+ CCSprite *spr = [CCSprite spriteWithFile:@"grossini.png"];
+ spr.position = ccp(100, 100);
+ [self addChild:spr];
+
+ id act1 = [CCMoveBy actionWithDuration:0.5 position:ccp(100, 0)];
+ id act2 = [act1 reverse];
+ id act3 = [CCSequence actions:act1, act2, nil];
+ id act4 = [CCRepeat actionWithAction:act3 times:2];
+
+ [spr runAction:act4];
+}
+
+-(NSString *) title
+{
+ return @"Issue 1288";
+}
+
+-(NSString*) subtitle
+{
+ return @"Sprite should end at the position where it started.";
+}
+
+- (void)dealloc {
+ [super dealloc];
+}
+@end
+
+#pragma mark - AppDelegate
// CLASS IMPLEMENTATIONS
Please sign in to comment.
Something went wrong with that request. Please try again.