diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp index f1a50c2120..38fbb7cecb 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp @@ -35,6 +35,7 @@ static std::function createFunctions[] = { CL(NewSpriteTest), CL(NewSpriteBatchTest), + CL(GroupCommandTest), CL(NewClippingNodeTest), CL(NewDrawNodeTest), CL(NewCullingTest), @@ -222,6 +223,28 @@ std::string NewSpriteTest::subtitle() const return "SpriteTest"; } +GroupCommandTest::GroupCommandTest() +{ + auto sprite = Sprite::create("Images/grossini.png"); + Size winSize = Director::getInstance()->getWinSize(); + sprite->setPosition(winSize.width/2,winSize.height/2); + addChild(sprite); +} + +GroupCommandTest::~GroupCommandTest() +{ +} + +std::string GroupCommandTest::title() const +{ + return "Renderer"; +} + +std::string GroupCommandTest::subtitle() const +{ + return "GroupCommandTest: You should see a sprite"; +} + //-------- New Sprite Batch Test NewSpriteBatchTest::NewSpriteBatchTest() diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h index 9fe691e2ee..7d41f92c7c 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h @@ -56,6 +56,19 @@ protected: virtual ~NewSpriteTest(); }; +class GroupCommandTest : public MultiSceneTest +{ +public: + CREATE_FUNC(GroupCommandTest); + + virtual std::string title() const override; + virtual std::string subtitle() const override; + +protected: + GroupCommandTest(); + virtual ~GroupCommandTest(); +}; + class NewSpriteBatchTest : public MultiSceneTest { public: