From 23b0d4d2f6d2505e3e49a27fed7f8532a19705f7 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Wed, 8 Apr 2015 21:23:47 -0700 Subject: [PATCH] more fixes with the namespaces --- .../ActionManagerTest/ActionManagerTest.cpp | 2 + .../ActionsEaseTest/ActionsEaseTest.cpp | 2 + .../Classes/ActionsTest/ActionsTest.cpp | 2 + .../CocosStudio3DTest/CocosStudio3DTest.cpp | 2 + .../ConfigurationTest/ConfigurationTest.cpp | 2 + .../Classes/ConsoleTest/ConsoleTest.cpp | 2 + .../AssetsManagerExTest.cpp | 3 ++ .../AssetsManagerExTest/AssetsManagerExTest.h | 4 +- .../ActionTimelineTestScene.h | 2 - .../CocoStudioArmatureTest/ArmatureScene.h | 2 +- .../CocoStudioSceneTest/SceneEditorTest.h | 22 +++++----- .../CCControlPotentiometerTest.cpp | 3 ++ .../Classes/FileUtilsTest/FileUtilsTest.cpp | 2 + .../NewAudioEngineTest/NewAudioEngineTest.h | 2 - .../PerformanceTest/PerformanceAllocTest.cpp | 3 ++ .../PerformanceCallbackTest.cpp | 3 +- .../PerformanceContainerTest.cpp | 3 +- .../PerformanceEventDispatcherTest.cpp | 3 +- .../PerformanceTest/PerformanceLabelTest.cpp | 2 + .../PerformanceTest/PerformanceMathTest.cpp | 2 + .../PerformanceNodeChildrenTest.cpp | 3 +- .../PerformanceTest/PerformanceSpriteTest.cpp | 2 + .../PerformanceTextureTest.cpp | 2 + .../PerformanceTouchesTest.cpp | 2 + .../RenderTextureTest/RenderTextureTest.cpp | 3 ++ tests/cpp-tests/Classes/SceneTest/SceneTest.h | 14 +++---- .../Classes/SchedulerTest/SchedulerTest.cpp | 1 + .../Classes/SchedulerTest/SchedulerTest.h | 10 ++--- .../Classes/ShaderTest/ShaderTest.cpp | 3 ++ .../cpp-tests/Classes/ShaderTest/ShaderTest.h | 4 +- .../Classes/ShaderTest/ShaderTest2.cpp | 2 + .../Classes/Sprite3DTest/Sprite3DTest.h | 42 +++++++++---------- .../Classes/TerrainTest/TerrainTest.cpp | 2 + .../Classes/TerrainTest/TerrainTest.h | 10 ++--- .../Classes/TextInputTest/TextInputTest.cpp | 2 + .../Classes/TextInputTest/TextInputTest.h | 20 ++++----- tests/cpp-tests/Classes/TouchesTest/Ball.cpp | 2 + .../TransitionsTest/TransitionsTest.cpp | 2 + .../CustomImageTest/CustomImageTest.cpp | 3 +- .../UIButtonTest/UIButtonTest.cpp | 3 ++ .../UIButtonTest/UIButtonTest_Editor.cpp | 3 ++ .../UICheckBoxTest/UICheckBoxTest_Editor.cpp | 3 ++ .../UICheckBoxTest/UICheckBoxTest_Editor.h | 2 +- .../UIFocusTest/UIFocusTest.cpp | 3 ++ .../UIFocusTest/UIFocusTest.h | 42 +++++++++---------- .../UIImageViewTest/UIImageViewTest.cpp | 3 ++ .../UIImageViewTest_Editor.cpp | 3 ++ .../UILayoutTest/UILayoutTest.cpp | 3 ++ .../UILayoutTest/UILayoutTest_Editor.cpp | 3 ++ .../UIListViewTest/UIListViewTest.cpp | 3 ++ .../UIListViewTest/UIListViewTest_Editor.cpp | 3 ++ .../UIListViewTest/UIListViewTest_Editor.h | 6 +-- .../UILoadingBarTest/UILoadingBarTest.cpp | 3 ++ .../UILoadingBarTest_Editor.cpp | 3 ++ .../UIPageViewTest/UIPageViewTest.cpp | 3 ++ .../UIPageViewTest/UIPageViewTest_Editor.cpp | 3 ++ .../UIRichTextTest/UIRichTextTest.cpp | 3 ++ .../CocoStudioGUITest/UIScale9SpriteTest.cpp | 3 ++ .../CocoStudioGUITest/UIScene_Editor.cpp | 2 + .../UIScrollViewTest/UIScrollViewTest.cpp | 3 ++ .../UIScrollViewTest_Editor.cpp | 3 ++ .../UISliderTest/UISliderTest.cpp | 3 ++ .../UITextAtlasTest/UITextAtlasTest.cpp | 3 ++ .../UITextAtlasTest_Editor.cpp | 3 ++ .../UITextBMFontTest/UITextBMFontTest.cpp | 3 ++ .../UITextBMFontTest_Editor.cpp | 3 ++ .../UITextFieldTest/UITextFieldTest.cpp | 3 ++ .../UITextFieldTest_Editor.cpp | 3 ++ .../UITextTest/UITextTest_Editor.cpp | 4 +- .../UIVideoPlayerTest/UIVideoPlayerTest.cpp | 1 + .../UIVideoPlayerTest/UIVideoPlayerTest.h | 4 +- .../UIWebViewTest/UIWebViewTest.cpp | 3 ++ .../UIWebViewTest/UIWebViewTest.h | 6 +-- .../UIWidgetAddNodeTest.cpp | 3 ++ .../UIWidgetAddNodeTest_Editor.cpp | 3 ++ 75 files changed, 244 insertions(+), 104 deletions(-) diff --git a/tests/cpp-tests/Classes/ActionManagerTest/ActionManagerTest.cpp b/tests/cpp-tests/Classes/ActionManagerTest/ActionManagerTest.cpp index 0143f503d6..c0bb7b5582 100644 --- a/tests/cpp-tests/Classes/ActionManagerTest/ActionManagerTest.cpp +++ b/tests/cpp-tests/Classes/ActionManagerTest/ActionManagerTest.cpp @@ -2,6 +2,8 @@ #include "../testResource.h" #include "cocos2d.h" +USING_NS_CC; + enum { kTagNode, diff --git a/tests/cpp-tests/Classes/ActionsEaseTest/ActionsEaseTest.cpp b/tests/cpp-tests/Classes/ActionsEaseTest/ActionsEaseTest.cpp index 3e9f980ddd..32bafae285 100644 --- a/tests/cpp-tests/Classes/ActionsEaseTest/ActionsEaseTest.cpp +++ b/tests/cpp-tests/Classes/ActionsEaseTest/ActionsEaseTest.cpp @@ -26,6 +26,8 @@ #include "ActionsEaseTest.h" #include "../testResource.h" +USING_NS_CC; + enum { kTagAction1 = 1, kTagAction2 = 2, diff --git a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp index 1ddc819736..564caca608 100644 --- a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp +++ b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp @@ -31,6 +31,8 @@ #include "renderer/CCCustomCommand.h" #include "renderer/CCGroupCommand.h" +USING_NS_CC; + ActionsTests::ActionsTests() { ADD_TEST_CASE(ActionManual); diff --git a/tests/cpp-tests/Classes/CocosStudio3DTest/CocosStudio3DTest.cpp b/tests/cpp-tests/Classes/CocosStudio3DTest/CocosStudio3DTest.cpp index 438bba67ad..19fbe9d9e9 100644 --- a/tests/cpp-tests/Classes/CocosStudio3DTest/CocosStudio3DTest.cpp +++ b/tests/cpp-tests/Classes/CocosStudio3DTest/CocosStudio3DTest.cpp @@ -26,6 +26,8 @@ #include "CocosStudio3DTest.h" #include "cocostudio/CocoStudio.h" +USING_NS_CC; + enum { IDC_NEXT = 100, diff --git a/tests/cpp-tests/Classes/ConfigurationTest/ConfigurationTest.cpp b/tests/cpp-tests/Classes/ConfigurationTest/ConfigurationTest.cpp index 03d36803e9..0bc7b67e13 100644 --- a/tests/cpp-tests/Classes/ConfigurationTest/ConfigurationTest.cpp +++ b/tests/cpp-tests/Classes/ConfigurationTest/ConfigurationTest.cpp @@ -3,6 +3,8 @@ #include "../testResource.h" #include "cocos2d.h" +USING_NS_CC; + ConfigurationTests::ConfigurationTests() { ADD_TEST_CASE(ConfigurationLoadConfig); diff --git a/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.cpp b/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.cpp index 0bfa248d30..638e0c93aa 100644 --- a/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.cpp +++ b/tests/cpp-tests/Classes/ConsoleTest/ConsoleTest.cpp @@ -41,6 +41,8 @@ #include #endif +USING_NS_CC; + //------------------------------------------------------------------ // // ConsoleTest diff --git a/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp index 2470679307..e3e37e571f 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp @@ -2,6 +2,9 @@ #include "../../testResource.h" #include "cocos2d.h" +USING_NS_CC; +USING_NS_CC_EXT; + const char* sceneManifests[] = {"AMTestScene1/project.manifest", "AMTestScene2/project.manifest", "AMTestScene3/project.manifest"}; const char* storagePaths[] = {"CppTests/AssetsManagerExTest/scene1/", "CppTests/AssetsManagerExTest/scene2/", "CppTests/AssetsManagerExTest/scene3"}; const char* backgroundPaths[] = {"Images/assetMgrBackground1.jpg", "Images/assetMgrBackground2.png", "Images/assetMgrBackground3.png"}; diff --git a/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.h b/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.h index 50fd7b4429..f9d8bffbd5 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.h +++ b/tests/cpp-tests/Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.h @@ -25,9 +25,9 @@ private: cocos2d::Layer* _loadLayer; cocos2d::Menu* _downloadMenu; - AssetsManagerEx *_am; + cocos2d::extension::AssetsManagerEx* _am; cocos2d::Label* _progress; - EventListenerAssetsManagerEx* _amListener; + cocos2d::extension::EventListenerAssetsManagerEx* _amListener; void onLoadEnd(); }; diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioActionTimelineTest/ActionTimelineTestScene.h b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioActionTimelineTest/ActionTimelineTestScene.h index 3fb7e68849..9994413792 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioActionTimelineTest/ActionTimelineTestScene.h +++ b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioActionTimelineTest/ActionTimelineTestScene.h @@ -5,8 +5,6 @@ #include "../../BaseTest.h" #include "cocostudio/CocoStudio.h" -using namespace cocostudio::timeline; - class CocoStudioActionTimelineTests : public TestSuite { public: diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h index 59a0074e2d..d5e0a44846 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h +++ b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h @@ -324,7 +324,7 @@ public: virtual void playWithIndex(int index); CC_SYNTHESIZE(cocostudio::Armature*, m_pMount, Mount); - CC_SYNTHESIZE(cocos2d::Scene*, _scene, cocos2d::Scene*); + CC_SYNTHESIZE(cocos2d::Scene*, _scene, Scene); }; class TestArmatureNesting2 : public ArmatureBaseTest diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h index 404f61a8a7..9b08e2c83d 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h +++ b/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h @@ -8,7 +8,7 @@ DEFINE_TEST_SUITE(CocoStudioSceneEditTests); -class cocos2d::Scene*EditorTestBase : public TestCase +class SceneEditorTestBase : public TestCase { public: virtual bool init() override; @@ -35,7 +35,7 @@ protected: std::string _filePath; }; -class LoadSceneEdtiorFileTest : public cocos2d::Scene*EditorTestBase +class LoadSceneEdtiorFileTest : public SceneEditorTestBase { public: CREATE_FUNC(LoadSceneEdtiorFileTest); @@ -52,7 +52,7 @@ private: }; -class SpriteComponentTest : public cocos2d::Scene*EditorTestBase +class SpriteComponentTest : public SceneEditorTestBase { public: CREATE_FUNC(SpriteComponentTest); @@ -69,7 +69,7 @@ private: void defaultPlay(); }; -class ArmatureComponentTest : public cocos2d::Scene*EditorTestBase +class ArmatureComponentTest : public SceneEditorTestBase { public: CREATE_FUNC(ArmatureComponentTest); @@ -86,7 +86,7 @@ private: void defaultPlay(); }; -class UIComponentTest : public cocos2d::Scene*EditorTestBase +class UIComponentTest : public SceneEditorTestBase { public: CREATE_FUNC(UIComponentTest); @@ -103,7 +103,7 @@ private: void defaultPlay(); }; -class TmxMapComponentTest : public cocos2d::Scene*EditorTestBase +class TmxMapComponentTest : public SceneEditorTestBase { public: CREATE_FUNC(TmxMapComponentTest); @@ -120,7 +120,7 @@ private: }; -class ParticleComponentTest : public cocos2d::Scene*EditorTestBase +class ParticleComponentTest : public SceneEditorTestBase { public: CREATE_FUNC(ParticleComponentTest); @@ -136,7 +136,7 @@ protected: void defaultPlay(); }; -class EffectComponentTest : public cocos2d::Scene*EditorTestBase +class EffectComponentTest : public SceneEditorTestBase { public: CREATE_FUNC(EffectComponentTest); @@ -154,7 +154,7 @@ private: }; -class BackgroundComponentTest : public cocos2d::Scene*EditorTestBase +class BackgroundComponentTest : public SceneEditorTestBase { public: CREATE_FUNC(BackgroundComponentTest); @@ -170,7 +170,7 @@ private: void defaultPlay(); }; -class AttributeComponentTest : public cocos2d::Scene*EditorTestBase +class AttributeComponentTest : public SceneEditorTestBase { public: CREATE_FUNC(AttributeComponentTest); @@ -188,7 +188,7 @@ private: void defaultPlay(); }; -class TriggerTest : public cocos2d::Scene*EditorTestBase +class TriggerTest : public SceneEditorTestBase { public: CREATE_FUNC(TriggerTest); diff --git a/tests/cpp-tests/Classes/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.cpp index e30316077c..0eae3a8229 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.cpp @@ -24,6 +24,9 @@ #include "CCControlPotentiometerTest.h" +USING_NS_CC; +USING_NS_CC_EXT; + ControlPotentiometerTest::ControlPotentiometerTest() : _displayValueLabel(nullptr) { diff --git a/tests/cpp-tests/Classes/FileUtilsTest/FileUtilsTest.cpp b/tests/cpp-tests/Classes/FileUtilsTest/FileUtilsTest.cpp index 092beda456..c846ad92e6 100644 --- a/tests/cpp-tests/Classes/FileUtilsTest/FileUtilsTest.cpp +++ b/tests/cpp-tests/Classes/FileUtilsTest/FileUtilsTest.cpp @@ -1,5 +1,7 @@ #include "FileUtilsTest.h" +USING_NS_CC; + FileUtilsTests::FileUtilsTests() { ADD_TEST_CASE(TestResolutionDirectories); diff --git a/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h b/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h index 28c65594b1..18dd00243c 100644 --- a/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h +++ b/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h @@ -35,8 +35,6 @@ DEFINE_TEST_SUITE(AudioEngineTests); -using namespace cocos2d; - class AudioEngineTestDemo : public TestCase { public: diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.cpp index e65f298504..392d234b55 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceAllocTest.cpp @@ -5,6 +5,9 @@ #include +USING_NS_CC; +using namespace cocos2d::ui; + // Enable profiles for this file #undef CC_PROFILER_DISPLAY_TIMERS #define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers() diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp index 9ee0c189e8..1ca4d3f649 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp @@ -3,9 +3,10 @@ // #include "PerformanceCallbackTest.h" - #include +USING_NS_CC; + // Enable profiles for this file #undef CC_PROFILER_DISPLAY_TIMERS #define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers() diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.cpp index 8adf177f04..84d1e020b2 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceContainerTest.cpp @@ -2,9 +2,10 @@ * */ #include "PerformanceContainerTest.h" - #include +USING_NS_CC; + // Enable profiles for this file #undef CC_PROFILER_DISPLAY_TIMERS #define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers() diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp index 7f958e3bd4..6852448a51 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp @@ -3,9 +3,10 @@ // #include "PerformanceEventDispatcherTest.h" - #include +USING_NS_CC; + // Enable profiles for this file #undef CC_PROFILER_DISPLAY_TIMERS #define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers() diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.cpp index 1202fa8bd9..15f9bc17f6 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceLabelTest.cpp @@ -1,5 +1,7 @@ #include "PerformanceLabelTest.h" +USING_NS_CC; + enum { kMaxNodes = 200, kNodesIncrease = 10, diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.cpp index ca64059a06..db42a63201 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceMathTest.cpp @@ -1,5 +1,7 @@ #include "PerformanceMathTest.h" +USING_NS_CC; + // Enable profiles for this file #undef CC_PROFILER_DISPLAY_TIMERS #define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers() diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp index f5b3c83d76..5593c14d20 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp @@ -1,7 +1,8 @@ #include "PerformanceNodeChildrenTest.h" - #include +USING_NS_CC; + // Enable profiles for this file #undef CC_PROFILER_DISPLAY_TIMERS #define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers() diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp index a931fd92bd..a11c7d8f39 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp @@ -29,6 +29,8 @@ #include +USING_NS_CC; + #if defined(_MSC_VER) && _MSC_VER<1800 #define CC_ROUND(__f__) __f__ #else diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.cpp index 59088a0eb6..5a4fa998f1 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTextureTest.cpp @@ -1,5 +1,7 @@ #include "PerformanceTextureTest.h" +USING_NS_CC; + enum { TEST_COUNT = 1, diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.cpp index 43c54e8a43..f4bde5637b 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceTouchesTest.cpp @@ -1,5 +1,7 @@ #include "PerformanceTouchesTest.h" +USING_NS_CC; + // Enable profiles for this file #undef CC_PROFILER_DISPLAY_TIMERS #define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers() diff --git a/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.cpp b/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.cpp index 8474dc4c49..adc412049f 100644 --- a/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.cpp +++ b/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.cpp @@ -1,6 +1,9 @@ #include "RenderTextureTest.h" #include "../testBasic.h" +USING_NS_CC; +using namespace cocos2d::ui; + RenderTextureTests::RenderTextureTests() { ADD_TEST_CASE(RenderTextureSave); diff --git a/tests/cpp-tests/Classes/SceneTest/SceneTest.h b/tests/cpp-tests/Classes/SceneTest/SceneTest.h index 4638e26c8f..9bc3589098 100644 --- a/tests/cpp-tests/Classes/SceneTest/SceneTest.h +++ b/tests/cpp-tests/Classes/SceneTest/SceneTest.h @@ -6,11 +6,11 @@ DEFINE_TEST_SUITE(SceneTests); -class cocos2d::Scene*TestLayer1 : public cocos2d::Layer +class SceneTestLayer1 : public cocos2d::Layer { public: CREATE_FUNC(SceneTestLayer1); - cocos2d::Scene*TestLayer1(); + SceneTestLayer1(); ~SceneTestLayer1(); virtual void onEnter() override; @@ -22,12 +22,12 @@ public: void onQuit(cocos2d::Ref* sender); } ; -class cocos2d::Scene*TestLayer2 : public cocos2d::Layer +class SceneTestLayer2 : public cocos2d::Layer { float _timeCounter; public: CREATE_FUNC(SceneTestLayer2); - cocos2d::Scene*TestLayer2(); + SceneTestLayer2(); void testDealloc(float dt); void onGoBack(cocos2d::Ref* sender); @@ -35,11 +35,11 @@ public: void onReplaceSceneTran(cocos2d::Ref* sender); } ; -class cocos2d::Scene*TestLayer3 : public cocos2d::LayerColor +class SceneTestLayer3 : public cocos2d::LayerColor { public: CREATE_FUNC(SceneTestLayer3); - cocos2d::Scene*TestLayer3(); + SceneTestLayer3(); bool init(); virtual void testDealloc(float dt); void item0Clicked(cocos2d::Ref* sender); @@ -48,7 +48,7 @@ public: void item3Clicked(cocos2d::Ref* sender); } ; -class cocos2d::Scene*TestScene : public TestCase +class SceneTestScene : public TestCase { public: CREATE_FUNC(SceneTestScene); diff --git a/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp b/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp index 79899ff96f..612d844e96 100644 --- a/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp +++ b/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp @@ -2,6 +2,7 @@ #include "../testResource.h" USING_NS_CC; +USING_NS_CC_EXT; enum { kTagAnimationDance = 1, diff --git a/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.h b/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.h index fe442e4319..536dc65a00 100644 --- a/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.h +++ b/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.h @@ -243,9 +243,9 @@ public: void onExit() override; virtual std::string title() const override; virtual std::string subtitle() const override; - ControlSlider* sliderCtl(); + cocos2d::extension::ControlSlider* sliderCtl(); void sliderAction(cocos2d::Ref* sender, cocos2d::extension::Control::EventType controlEvent); - ControlSlider* _sliderCtl; + cocos2d::extension::ControlSlider* _sliderCtl; }; @@ -258,15 +258,15 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; void onEnter() override; - ControlSlider* sliderCtl(); + cocos2d::extension::ControlSlider* sliderCtl(); void sliderAction(cocos2d::Ref* sender, cocos2d::extension::Control::EventType controlEvent); cocos2d::Scheduler* sched1; cocos2d::Scheduler* sched2; cocos2d::ActionManager* actionManager1; cocos2d::ActionManager* actionManager2; - ControlSlider *sliderCtl1; - ControlSlider *sliderCtl2; + cocos2d::extension::ControlSlider* sliderCtl1; + cocos2d::extension::ControlSlider* sliderCtl2; }; class SchedulerIssue2268 : public SchedulerTestLayer diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp b/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp index 70b5cb826c..fd05a23ff2 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp @@ -2,6 +2,9 @@ #include "../testResource.h" #include "cocos2d.h" +USING_NS_CC; +USING_NS_CC_EXT; + ShaderTests::ShaderTests() { ADD_TEST_CASE(ShaderLensFlare); diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest.h b/tests/cpp-tests/Classes/ShaderTest/ShaderTest.h index 6ca8209ae5..a02451e83a 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest.h +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest.h @@ -96,8 +96,8 @@ public: protected: SpriteBlur* _blurSprite; - ControlSlider* _sliderRadiusCtl; - ControlSlider* _sliderNumCtrl; + cocos2d::extension::ControlSlider* _sliderRadiusCtl; + cocos2d::extension::ControlSlider* _sliderNumCtrl; }; class ShaderRetroEffect : public ShaderTestDemo diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp index 908335c5e1..db078d8fdd 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp @@ -28,6 +28,8 @@ #include "cocos2d.h" #include +USING_NS_CC; + Shader2Tests::Shader2Tests() { ADD_TEST_CASE(EffectSpriteTest); diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h index 430064aa47..fa07d18215 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h @@ -46,7 +46,7 @@ public: virtual std::string title() const override; }; -class Sprite3DForceDepthTest : public cocos2d::Sprite3DTestDemo +class Sprite3DForceDepthTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DForceDepthTest); @@ -55,7 +55,7 @@ public: virtual std::string subtitle() const override; }; -class Sprite3DEmptyTest : public cocos2d::Sprite3DTestDemo +class Sprite3DEmptyTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DEmptyTest); @@ -64,7 +64,7 @@ public: virtual std::string subtitle() const override; }; -class Sprite3DBasicTest : public cocos2d::Sprite3DTestDemo +class Sprite3DBasicTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DBasicTest); @@ -76,7 +76,7 @@ public: void onTouchesEnded(const std::vector& touches, cocos2d::Event* event); }; -class Sprite3DUVAnimationTest : public cocos2d::Sprite3DTestDemo +class Sprite3DUVAnimationTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DUVAnimationTest); @@ -97,7 +97,7 @@ protected: #endif }; -class Sprite3DFakeShadowTest : public cocos2d::Sprite3DTestDemo +class Sprite3DFakeShadowTest : public Sprite3DTestDemo { public: enum State @@ -133,7 +133,7 @@ private: #endif }; -class Sprite3DLightMapTest : public cocos2d::Sprite3DTestDemo +class Sprite3DLightMapTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DLightMapTest); @@ -146,7 +146,7 @@ private: cocos2d::Camera * _camera; }; -class Sprite3DBasicToonShaderTest : public cocos2d::Sprite3DTestDemo +class Sprite3DBasicToonShaderTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DBasicToonShaderTest); @@ -218,7 +218,7 @@ protected: static cocos2d::GLProgram* getOrCreateProgram(bool isSkinned = false); }; -class Sprite3DHitTest : public cocos2d::Sprite3DTestDemo +class Sprite3DHitTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DHitTest); @@ -245,7 +245,7 @@ protected: cocos2d::CustomCommand _command; }; -class Sprite3DEffectTest : public cocos2d::Sprite3DTestDemo +class Sprite3DEffectTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DEffectTest); @@ -258,7 +258,7 @@ public: void onTouchesEnded(const std::vector& touches, cocos2d::Event* event); }; -class AsyncLoadSprite3DTest : public cocos2d::Sprite3DTestDemo +class AsyncLoadSprite3DTest : public Sprite3DTestDemo { public: CREATE_FUNC(AsyncLoadSprite3DTest); @@ -275,7 +275,7 @@ protected: std::vector _paths; //model paths to be loaded }; -class Sprite3DWithSkinTest : public cocos2d::Sprite3DTestDemo +class Sprite3DWithSkinTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DWithSkinTest); @@ -293,7 +293,7 @@ private: cocos2d::MenuItemFont* _menuItem; }; -class Sprite3DWithSkinOutlineTest : public cocos2d::Sprite3DTestDemo +class Sprite3DWithSkinOutlineTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DWithSkinOutlineTest); @@ -306,7 +306,7 @@ public: void onTouchesEnded(const std::vector& touches, cocos2d::Event* event); }; -class Animate3DTest : public cocos2d::Sprite3DTestDemo +class Animate3DTest : public Sprite3DTestDemo { public: CREATE_FUNC(Animate3DTest); @@ -346,7 +346,7 @@ protected: cocos2d::MoveTo* _moveAction; }; -class AttachmentTest : public cocos2d::Sprite3DTestDemo +class AttachmentTest : public Sprite3DTestDemo { public: CREATE_FUNC(AttachmentTest); @@ -363,7 +363,7 @@ protected: cocos2d::Sprite3D* _sprite; }; -class Sprite3DReskinTest : public cocos2d::Sprite3DTestDemo +class Sprite3DReskinTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DReskinTest); @@ -393,7 +393,7 @@ protected: int _curSkin[(int)SkinType::MAX_TYPE]; //current skin index cocos2d::Sprite3D* _sprite; }; -class Sprite3DWithOBBPerformanceTest : public cocos2d::Sprite3DTestDemo +class Sprite3DWithOBBPerformanceTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DWithOBBPerformanceTest); @@ -427,7 +427,7 @@ protected: void calculateRayByLocationInView(cocos2d::Ray* ray, const cocos2d::Vec2& location); }; -class Sprite3DMirrorTest : public cocos2d::Sprite3DTestDemo +class Sprite3DMirrorTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DMirrorTest); @@ -443,7 +443,7 @@ protected: cocos2d::Sprite3D* _mirrorSprite; }; -class QuaternionTest : public cocos2d::Sprite3DTestDemo +class QuaternionTest : public Sprite3DTestDemo { public: CREATE_FUNC(QuaternionTest); @@ -462,7 +462,7 @@ protected: }; // 3d + 2d use case -class UseCaseSprite3D : public cocos2d::Sprite3DTestDemo +class UseCaseSprite3D : public Sprite3DTestDemo { public: CREATE_FUNC(UseCaseSprite3D); @@ -489,7 +489,7 @@ protected: }; // node animation test, cocos2d-x supports both skeletal animation and node animation -class NodeAnimationTest : public cocos2d::Sprite3DTestDemo +class NodeAnimationTest : public Sprite3DTestDemo { public: CREATE_FUNC(NodeAnimationTest); @@ -508,7 +508,7 @@ namespace cocos2d class TextureCube; class Skybox; } -class Sprite3DCubeMapTest : public cocos2d::Sprite3DTestDemo +class Sprite3DCubeMapTest : public Sprite3DTestDemo { public: CREATE_FUNC(Sprite3DCubeMapTest); diff --git a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp index 1f433cbb6d..8152dd1af5 100644 --- a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp +++ b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp @@ -1,5 +1,7 @@ #include "TerrainTest.h" +USING_NS_CC; + TerrainTests::TerrainTests() { ADD_TEST_CASE(TerrainSimple); diff --git a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.h b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.h index c537b72e55..22cd95a90a 100644 --- a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.h +++ b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.h @@ -23,9 +23,9 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; void onTouchesMoved(const std::vector& touches, cocos2d::Event* event); - Terrain * _terrain; + cocos2d::Terrain* _terrain; protected: - cocos2d::Camera* _camera; + cocos2d::Camera* _camera; }; #define PLAYER_STATE_LEFT 0 @@ -37,7 +37,7 @@ protected: class Player : public cocos2d::Sprite3D { public: - static Player * create(const char * file, cocos2d::Camera* cam, Terrain * terrain); + static Player * create(const char * file, cocos2d::Camera* cam, cocos2d::Terrain* terrain); virtual bool isDone() const; virtual void update(float dt); @@ -51,7 +51,7 @@ public: float _headingAngle; cocos2d::Vec3 _headingAxis; private: - Terrain * _terrain; + cocos2d::Terrain* _terrain; cocos2d::Camera* _cam; int _playerState; }; @@ -73,7 +73,7 @@ protected: cocos2d::Label* left; cocos2d::Label* right; cocos2d::Camera* _camera; - Terrain * _terrain; + cocos2d::Terrain* _terrain; Player * _player; }; diff --git a/tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp b/tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp index b00eac5ae7..543990d7cc 100644 --- a/tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp +++ b/tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp @@ -1,5 +1,7 @@ #include "TextInputTest.h" +USING_NS_CC; + #define FONT_NAME "fonts/Thonburi.ttf" #define FONT_SIZE 36 diff --git a/tests/cpp-tests/Classes/TextInputTest/TextInputTest.h b/tests/cpp-tests/Classes/TextInputTest/TextInputTest.h index cb9dac4a5c..2eedfdf06a 100644 --- a/tests/cpp-tests/Classes/TextInputTest/TextInputTest.h +++ b/tests/cpp-tests/Classes/TextInputTest/TextInputTest.h @@ -12,14 +12,14 @@ DEFINE_TEST_SUITE(TextInputTests); // KeyboardNotificationLayer for test IME keyboard notification. ////////////////////////////////////////////////////////////////////////// -class KeyboardNotificationLayer : public TestCase, public IMEDelegate +class KeyboardNotificationLayer : public TestCase, public cocos2d::IMEDelegate { public: KeyboardNotificationLayer(); virtual std::string title() const override; virtual void onClickTrackNode(bool bClicked) = 0; - virtual void keyboardWillShow(IMEKeyboardNotificationInfo& info); + virtual void keyboardWillShow(cocos2d::IMEKeyboardNotificationInfo& info); bool onTouchBegan(cocos2d::Touch* touch, cocos2d::Event* event); void onTouchEnded(cocos2d::Touch* touch, cocos2d::Event* event); @@ -49,10 +49,10 @@ public: // TextFieldTTFActionTest ////////////////////////////////////////////////////////////////////////// -class TextFieldTTFActionTest : public KeyboardNotificationLayer, public TextFieldDelegate +class TextFieldTTFActionTest : public KeyboardNotificationLayer, public cocos2d::TextFieldDelegate { - TextFieldTTF * _textField; - Action * _textFieldAction; + cocos2d::TextFieldTTF* _textField; + cocos2d::Action* _textFieldAction; bool _action; int _charLimit; // the textfield max char limit @@ -69,11 +69,11 @@ public: virtual void onExit() override; // TextFieldDelegate - virtual bool onTextFieldAttachWithIME(TextFieldTTF * sender) override; - virtual bool onTextFieldDetachWithIME(TextFieldTTF * sender) override; - virtual bool onTextFieldInsertText(TextFieldTTF * sender, const char * text, size_t nLen) override; - virtual bool onTextFieldDeleteBackward(TextFieldTTF * sender, const char * delText, size_t nLen) override; - virtual bool onDraw(TextFieldTTF * sender); + virtual bool onTextFieldAttachWithIME(cocos2d::TextFieldTTF* sender) override; + virtual bool onTextFieldDetachWithIME(cocos2d::TextFieldTTF* sender) override; + virtual bool onTextFieldInsertText(cocos2d::TextFieldTTF* sender, const char * text, size_t nLen) override; + virtual bool onTextFieldDeleteBackward(cocos2d::TextFieldTTF* sender, const char * delText, size_t nLen) override; + virtual bool onDraw(cocos2d::TextFieldTTF* sender); }; #endif // __TEXT_INPUT_TEST_H__ diff --git a/tests/cpp-tests/Classes/TouchesTest/Ball.cpp b/tests/cpp-tests/Classes/TouchesTest/Ball.cpp index 1c25c5224c..cfc2886dcb 100644 --- a/tests/cpp-tests/Classes/TouchesTest/Ball.cpp +++ b/tests/cpp-tests/Classes/TouchesTest/Ball.cpp @@ -2,6 +2,8 @@ #include "Paddle.h" #include "../VisibleRect.h" +USING_NS_CC; + Ball::Ball(void) { } diff --git a/tests/cpp-tests/Classes/TransitionsTest/TransitionsTest.cpp b/tests/cpp-tests/Classes/TransitionsTest/TransitionsTest.cpp index d4b2cb68b4..ac1e755f26 100644 --- a/tests/cpp-tests/Classes/TransitionsTest/TransitionsTest.cpp +++ b/tests/cpp-tests/Classes/TransitionsTest/TransitionsTest.cpp @@ -26,6 +26,8 @@ #include "TransitionsTest.h" #include "../testResource.h" +USING_NS_CC; + #define TRANSITION_DURATION (1.2f) class FadeWhiteTransition : public TransitionFade diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp index 9ce2776043..0bffd2009d 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp @@ -7,7 +7,8 @@ USING_NS_CC; USING_NS_CC_EXT; - +using namespace cocos2d::ui; +using namespace cocostudio; // CustomImageLayer bool CustomImageLayer::init() diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp index 5beb96015e..27e4625dcc 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp @@ -1,5 +1,8 @@ #include "UIButtonTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIButtonTests::UIButtonTests() { ADD_TEST_CASE(UIButtonTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp index 4d757cc632..dee4b016ff 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp @@ -1,5 +1,8 @@ #include "UIButtonTest_Editor.h" +USING_NS_CC; +using namespace cocos2d::ui; + // UIButtonTest_Editor UIButtonEditorTests::UIButtonEditorTests() diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp index c4dc97a1d0..16634e18a5 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp @@ -1,5 +1,8 @@ #include "UICheckBoxTest_Editor.h" +USING_NS_CC; +using namespace cocos2d::ui; + UICheckBoxEditorTests::UICheckBoxEditorTests() { ADD_TEST_CASE(UICheckBoxTest_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.h index 85c70c586e..f95c377eff 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.h @@ -39,7 +39,7 @@ public: virtual bool init() override; - void selectedStateEvent(cocos2d::Ref* sender, CheckBox::EventType type); + void selectedStateEvent(cocos2d::Ref* sender, cocos2d::ui::CheckBox::EventType type); virtual void configureGUIScene() override; protected: cocos2d::ui::Text* _displayValueLabel; diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp index 4db1ab44dc..3702b0b47f 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp @@ -8,6 +8,9 @@ #include "UIFocusTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIFocusTests::UIFocusTests() { ADD_TEST_CASE(UIFocusTestHorizontal); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.h index f9abdb20d4..a19bc5e54f 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.h @@ -25,14 +25,14 @@ public: virtual void onRightKeyPressed(); virtual void onUpKeyPressed(); virtual void onDownKeyPressed(); - virtual void onFocusChanged(Widget* widgetLostFocus, cocos2d::ui::Widget* widgetGetFocus); + virtual void onFocusChanged(cocos2d::ui::Widget* widgetLostFocus, cocos2d::ui::Widget* widgetGetFocus); void onImageViewClicked(cocos2d::Ref* ref, cocos2d::ui::Widget::TouchEventType touchType); protected: cocos2d::Menu* _dpadMenu; - Widget *_firstFocusedWidget; - EventListenerFocus *_eventListener; + cocos2d::ui::Widget* _firstFocusedWidget; + cocos2d::EventListenerFocus* _eventListener; }; class UIFocusTestHorizontal : public UIFocusTestBase @@ -45,11 +45,11 @@ public: virtual bool init() override; - void toggleFocusLoop(cocos2d::Ref*,Widget::TouchEventType); + void toggleFocusLoop(cocos2d::Ref*,cocos2d::ui::Widget::TouchEventType); protected: - Layout *_horizontalLayout; - Text *_loopText; + cocos2d::ui::Layout* _horizontalLayout; + cocos2d::ui::Text* _loopText; }; class UIFocusTestVertical : public UIFocusTestBase @@ -62,10 +62,10 @@ public: virtual bool init() override; - void toggleFocusLoop(cocos2d::Ref*,Widget::TouchEventType); + void toggleFocusLoop(cocos2d::Ref*,cocos2d::ui::Widget::TouchEventType); protected: - Layout *_verticalLayout; - Text *_loopText; + cocos2d::ui::Layout* _verticalLayout; + cocos2d::ui::Text* _loopText; }; class UIFocusTestNestedLayout1 : public UIFocusTestBase @@ -78,10 +78,10 @@ public: virtual bool init() override; - void toggleFocusLoop(cocos2d::Ref*,Widget::TouchEventType); + void toggleFocusLoop(cocos2d::Ref*,cocos2d::ui::Widget::TouchEventType); protected: - Layout *_verticalLayout; - Text *_loopText; + cocos2d::ui::Layout* _verticalLayout; + cocos2d::ui::Text* _loopText; }; class UIFocusTestNestedLayout2 : public UIFocusTestBase @@ -94,10 +94,10 @@ public: virtual bool init() override; - void toggleFocusLoop(cocos2d::Ref*,Widget::TouchEventType); + void toggleFocusLoop(cocos2d::Ref*,cocos2d::ui::Widget::TouchEventType); protected: - Layout *_horizontalLayout; - Text *_loopText; + cocos2d::ui::Layout* _horizontalLayout; + cocos2d::ui::Text* _loopText; }; class UIFocusTestNestedLayout3 : public UIFocusTestBase @@ -110,10 +110,10 @@ public: virtual bool init() override; - void toggleFocusLoop(cocos2d::Ref*,Widget::TouchEventType); + void toggleFocusLoop(cocos2d::Ref*,cocos2d::ui::Widget::TouchEventType); protected: - Layout *_verticalLayout; - Text *_loopText; + cocos2d::ui::Layout* _verticalLayout; + cocos2d::ui::Text* _loopText; }; class UIFocusTestListView : public UIFocusTestBase @@ -126,10 +126,10 @@ public: virtual bool init() override; - void toggleFocusLoop(cocos2d::Ref*,Widget::TouchEventType); + void toggleFocusLoop(cocos2d::Ref*,cocos2d::ui::Widget::TouchEventType); protected: - ListView *_listView; - Text *_loopText; + cocos2d::ui::ListView* _listView; + cocos2d::ui::Text* _loopText; }; diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp index 3cf5769324..e4424ebdf0 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp @@ -1,5 +1,8 @@ #include "UIImageViewTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIImageViewTests::UIImageViewTests() { ADD_TEST_CASE(UIImageViewTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp index 5a7088ff95..4c1d618317 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp @@ -1,5 +1,8 @@ #include "UIImageViewTest_Editor.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIImageViewEditorTests::UIImageViewEditorTests() { ADD_TEST_CASE(UIImageViewTest_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp index b55eaf1210..b38944ac00 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp @@ -1,5 +1,8 @@ #include "UILayoutTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UILayoutTests::UILayoutTests() { ADD_TEST_CASE(UILayoutTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp index 75364e23fb..0f88262e3a 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp @@ -1,6 +1,9 @@ #include "UILayoutTest_Editor.h" #include "VisibleRect.h" +USING_NS_CC; +using namespace cocos2d::ui; + UILayoutEditorTests::UILayoutEditorTests() { ADD_TEST_CASE(UILayoutTest_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp index 652646ac1d..b996707b03 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp @@ -1,5 +1,8 @@ #include "UIListViewTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + const char* font_UIListViewTest = "fonts/Marker Felt.ttf"; UIListViewTests::UIListViewTests() diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp index e8f6b43ae2..b44fdf589b 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp @@ -1,6 +1,9 @@ #include "UIListViewTest_Editor.h" #include "VisibleRect.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIListViewEditorTests::UIListViewEditorTests() { ADD_TEST_CASE(UIListViewTest_Vertical_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.h index 26bcde3639..4d53e5b1e8 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.h @@ -34,7 +34,7 @@ class UIListViewTest_Vertical_Editor : public UIScene_Editor public: CREATE_FUNC(UIListViewTest_Vertical_Editor); - static void setupListView(ListView* listView); + static void setupListView(cocos2d::ui::ListView* listView); UIListViewTest_Vertical_Editor(); ~UIListViewTest_Vertical_Editor(); @@ -43,7 +43,7 @@ public: protected: cocos2d::ui::Text* _displayValueLabel; - __Array* _array; + cocos2d::__Array* _array; }; @@ -60,7 +60,7 @@ public: protected: cocos2d::ui::Text* _displayValueLabel; - __Array* _array; + cocos2d::__Array* _array; }; #endif /* defined(__TestCpp__UIListViewTest_Editor__) */ diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp index 19b1d086cd..b246387109 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp @@ -1,5 +1,8 @@ #include "UILoadingBarTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UILoadingBarTests::UILoadingBarTests() { ADD_TEST_CASE(UILoadingBarTest_Left); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp index 7b32cf908b..956ce50c73 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp @@ -1,5 +1,8 @@ #include "UILoadingBarTest_Editor.h" +USING_NS_CC; +using namespace cocos2d::ui; + UILoadingBarEditorTests::UILoadingBarEditorTests() { ADD_TEST_CASE(UILoadingBarTest_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp index f6e11882bc..cb31870d94 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp @@ -1,6 +1,9 @@ #include "UIPageViewTest.h" #include "cocos2d.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIPageViewTests::UIPageViewTests() { ADD_TEST_CASE(UIPageViewTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp index 5c86f0e044..dec0c59b5a 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp @@ -1,6 +1,9 @@ #include "UIPageViewTest_Editor.h" #include "VisibleRect.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIPageViewEditorTests::UIPageViewEditorTests() { ADD_TEST_CASE(UIPageViewTest_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp index dcb63c8652..35b11b1c66 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp @@ -2,6 +2,9 @@ #include "cocostudio/CCArmatureDataManager.h" #include "cocostudio/CCArmature.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIRichTextTests::UIRichTextTests() { ADD_TEST_CASE(UIRichTextTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp index 7195c65e09..76a6d7fad1 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp @@ -25,6 +25,9 @@ #include "UIScale9SpriteTest.h" #include "testResource.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIScale9SpriteTests::UIScale9SpriteTests() { ADD_TEST_CASE(UIScale9SpriteTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp index 5c80565ece..300650cb2a 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp @@ -3,6 +3,8 @@ #include "ui/CocosGUI.h" #include "UISceneManager_Editor.h" +USING_NS_CC; +using namespace cocos2d::ui; UIScene_Editor::UIScene_Editor() : _touchGroup(nullptr) diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp index 1afc066159..78146c3747 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp @@ -1,5 +1,8 @@ #include "UIScrollViewTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIScrollViewTests::UIScrollViewTests() { ADD_TEST_CASE(UIScrollViewTest_Vertical); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp index c6ddbd5568..dbc6bf49c9 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp @@ -1,6 +1,9 @@ #include "UIScrollViewTest_Editor.h" #include "VisibleRect.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIScrollViewEditorTests::UIScrollViewEditorTests() { ADD_TEST_CASE(UIScrollViewTest_Vertical_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp index ccb43ac3da..46b5b71df3 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp @@ -1,5 +1,8 @@ #include "UISliderTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UISliderTests::UISliderTests() { ADD_TEST_CASE(UISliderTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp index fd92ccd8c8..40825aba09 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp @@ -1,5 +1,8 @@ #include "UITextAtlasTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UITextAtlasTests::UITextAtlasTests() { ADD_TEST_CASE(UITextAtlasTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp index ad9bf7df87..accd776781 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp @@ -1,5 +1,8 @@ #include "UITextAtlasTest_Editor.h" +USING_NS_CC; +using namespace cocos2d::ui; + UITextAtlasEditorTests::UITextAtlasEditorTests() { ADD_TEST_CASE(UITextAtlasTest_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp index aa38ef015b..211132dc02 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp @@ -1,5 +1,8 @@ #include "UITextBMFontTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UITextBMFontTests::UITextBMFontTests() { ADD_TEST_CASE(UITextBMFontTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp index 888d3f03c4..3926564b6d 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp @@ -1,5 +1,8 @@ #include "UITextBMFontTest_Editor.h" +USING_NS_CC; +using namespace cocos2d::ui; + UITextBMFontEditorTest::UITextBMFontEditorTest() { ADD_TEST_CASE(UITextBMFontTest_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp index ef8d14fc79..f8f8476124 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp @@ -1,5 +1,8 @@ #include "UITextFieldTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UITextFieldTests::UITextFieldTests() { ADD_TEST_CASE(UITextFieldTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp index da8877a417..7e6939ceca 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp @@ -1,5 +1,8 @@ #include "UITextFieldTest_Editor.h" +USING_NS_CC; +using namespace cocos2d::ui; + UITextFieldEditorTests::UITextFieldEditorTests() { ADD_TEST_CASE(UITextFieldTest_Editor); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp index f731aa2d24..0c6bf27e40 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp @@ -1,12 +1,14 @@ #include "UITextTest_Editor.h" #include "ui/CocosGUI.h" +USING_NS_CC; +using namespace cocos2d::ui; + UITextEditorTests::UITextEditorTests() { ADD_TEST_CASE(UITextTest_Editor); } // UITextTest_Editor -using namespace ui; bool UITextTest_Editor::init() { diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.cpp index 6d08dd19ca..31e9e299da 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.cpp @@ -1,6 +1,7 @@ #include "UIVideoPlayerTest.h" USING_NS_CC; +using namespace cocos2d::ui; using namespace cocos2d::experimental::ui; VideoPlayerTests::VideoPlayerTests() diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.h index ca3a87acec..c02699ef72 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.h @@ -26,14 +26,14 @@ public: void sliderCallback(cocos2d::Ref* sender, cocos2d::ui::Slider::EventType eventType); - void videoEventCallback(cocos2d::Ref* sender, experimental::ui::VideoPlayer::EventType eventType); + void videoEventCallback(cocos2d::Ref* sender, cocos2d::experimental::ui::VideoPlayer::EventType eventType); private: void createVideo(); void createSlider(); cocos2d::MenuItemFont* _hintItem; - experimental::ui::VideoPlayer* _videoPlayer; + cocos2d::experimental::ui::VideoPlayer* _videoPlayer; cocos2d::Label* _videoStateLabel; cocos2d::Rect _visibleRect; diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp index 55991964fd..58e8ba707c 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp @@ -24,6 +24,9 @@ #include "UIWebViewTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + WebViewTests::WebViewTests() { ADD_TEST_CASE(WebViewTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h index 733089c8c3..32da5d0e5a 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h @@ -35,9 +35,9 @@ public: CREATE_FUNC(WebViewTest); virtual bool init() override; - bool onWebViewShouldStartLoading(experimental::ui::WebView *sender, const std::string &url); - void onWebViewDidFinishLoading(experimental::ui::WebView *sender, const std::string &url); - void onWebViewDidFailLoading(experimental::ui::WebView *sender, const std::string &url); + bool onWebViewShouldStartLoading(cocos2d::experimental::ui::WebView *sender, const std::string &url); + void onWebViewDidFinishLoading(cocos2d::experimental::ui::WebView *sender, const std::string &url); + void onWebViewDidFailLoading(cocos2d::experimental::ui::WebView *sender, const std::string &url); private: diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp index 06af710ea1..191e0b5714 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp @@ -1,5 +1,8 @@ #include "UIWidgetAddNodeTest.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIWidgetAddNodeTests::UIWidgetAddNodeTests() { ADD_TEST_CASE(UIWidgetAddNodeTest); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp index 5672729bb9..cc0110297b 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp @@ -1,5 +1,8 @@ #include "UIWidgetAddNodeTest_Editor.h" +USING_NS_CC; +using namespace cocos2d::ui; + UIWidgetAddNodeEditorTests::UIWidgetAddNodeEditorTests() { ADD_TEST_CASE(UIWidgetAddNodeTest_Editor);