add blendfunc Frame test case

This commit is contained in:
geron-cn 2015-08-20 11:29:52 +08:00
parent fc763e9732
commit ede4651b5e
3 changed files with 27 additions and 1 deletions

View File

@ -23,6 +23,7 @@ CocoStudioActionTimelineTests::CocoStudioActionTimelineTests()
ADD_TEST_CASE(TestActionTimelineEase); ADD_TEST_CASE(TestActionTimelineEase);
ADD_TEST_CASE(TestActionTimelineSkeleton); ADD_TEST_CASE(TestActionTimelineSkeleton);
ADD_TEST_CASE(TestTimelineExtensionData); ADD_TEST_CASE(TestTimelineExtensionData);
ADD_TEST_CASE(TestActionTimelineBlendFuncFrame);
} }
CocoStudioActionTimelineTests::~CocoStudioActionTimelineTests() CocoStudioActionTimelineTests::~CocoStudioActionTimelineTests()
@ -578,3 +579,21 @@ std::string TestTimelineExtensionData::title() const
{ {
return "Test Timeline extension data"; return "Test Timeline extension data";
} }
// TestActionTimelineBlendFuncFrame
void TestActionTimelineBlendFuncFrame::onEnter()
{
ActionTimelineBaseTest::onEnter();
Node* node = CSLoader::createNode("ActionTimeline/skeletonBlendFuncFrame.csb");
ActionTimeline* action = CSLoader::createTimeline("ActionTimeline/skeletonBlendFuncFrame.csb");
node->runAction(action);
node->setScale(0.2f);
node->setPosition(VisibleRect::center());
this->addChild(node);
action->gotoFrameAndPlay(0);
}
std::string TestActionTimelineBlendFuncFrame::title() const
{
return "Test ActionTimeline BlendFunc Frame";
}

View File

@ -139,4 +139,11 @@ public:
virtual std::string title() const override; virtual std::string title() const override;
}; };
class TestActionTimelineBlendFuncFrame : public ActionTimelineBaseTest
{
public:
CREATE_FUNC(TestActionTimelineBlendFuncFrame);
virtual void onEnter() override;
virtual std::string title() const override;
};
#endif // __ANIMATION_SCENE_H__ #endif // __ANIMATION_SCENE_H__