From 3937b4d631f43f8a4c34924b33670806c6ddffbe Mon Sep 17 00:00:00 2001 From: mogemimi Date: Thu, 23 Feb 2017 17:14:39 +0900 Subject: [PATCH] Fix minor typos in UI test cases (#17400) --- .../CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp | 2 +- .../CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp | 2 +- .../CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp | 8 ++++---- .../CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp | 4 ++-- .../CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp | 2 +- .../Classes/UITest/CocoStudioGUITest/UIScene.cpp | 2 +- .../CocoStudioGUITest/UISliderTest/UISliderTest.cpp | 2 +- .../UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp | 6 +++--- .../js-tests/src/GUITest/UICheckBoxTest/UICheckBoxTest.js | 2 +- .../js-tests/src/GUITest/UIPageViewTest/UIPageViewTest.js | 4 ++-- .../js-tests/src/GUITest/UIRichTextTest/UIRichTextTest.js | 2 +- tests/js-tests/src/GUITest/UITextTest/UITextTest.js | 4 ++-- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp index 0fa3715cef..c68c056353 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp @@ -439,7 +439,7 @@ bool UIButtonTest_Title::init() button->setTitleText("Title Button!"); button->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f)); button->setTitleColor(Color3B::YELLOW); - CCASSERT(button->getTitleColor() == Color3B::YELLOW, "Button setTitleColotr & getTitleColor not match!"); + CCASSERT(button->getTitleColor() == Color3B::YELLOW, "Button setTitleColor & getTitleColor not match!"); button->addTouchEventListener(CC_CALLBACK_2(UIButtonTest_Title::touchEvent, this)); _uiLayer->addChild(button); button->setFlippedX(true); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp index 7037b14ca3..35f3edf42b 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp @@ -120,7 +120,7 @@ bool UICheckBoxDefaultBehaviorTest::init() _uiLayer->addChild(_displayValueLabel); // Add the alert - Text* alert = Text::create("Only left two and the last checkbox can be cliked!","fonts/Marker Felt.ttf",20 ); + Text* alert = Text::create("Only left two and the last checkbox can be clicked!","fonts/Marker Felt.ttf",20 ); alert->setColor(Color3B(159, 168, 176)); alert->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f - alert->getContentSize().height * 1.75f)); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp index c9a0203d90..44a8c0f649 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp @@ -21,7 +21,7 @@ UIListViewTests::UIListViewTests() UIListViewTest_Vertical::UIListViewTest_Vertical() : _displayValueLabel(nullptr), -_spawnCount(5), //swpanCount should > listview.width / tempalteWidth + 2 +_spawnCount(5), //spawnCount should > listview.width / templateWidth + 2 _totalCount(50), _bufferZone(45), //bufferZone should be larger than List item width _updateTimer(0), @@ -217,7 +217,7 @@ void UIListViewTest_Vertical::update(float dt) if (itemPos < -_bufferZone && item->getPosition().y + _reuseItemOffset < totalHeight) { int itemID = item->getTag() - (int)items.size(); item->setPositionY(item->getPositionY() + _reuseItemOffset); - CCLOG("itemPos = %f, itemID = %d, tempateID = %d", itemPos, itemID, i); + CCLOG("itemPos = %f, itemID = %d, templateID = %d", itemPos, itemID, i); this->updateItem(itemID, i); } } @@ -278,7 +278,7 @@ void UIListViewTest_Vertical::selectedItemEventScrollView(Ref* pSender, ui::Scro UIListViewTest_Horizontal::UIListViewTest_Horizontal() : _displayValueLabel(nullptr), -_spawnCount(4), //swpanCount should > listview.width / tempalteWidth + 2 +_spawnCount(4), //spawnCount should > listview.width / templateWidth + 2 _totalCount(50), _bufferZone(140), //bufferZone should be larger than List item width _updateTimer(0), @@ -432,7 +432,7 @@ void UIListViewTest_Horizontal::update(float dt) if (itemPos < -_bufferZone && item->getPosition().x + _reuseItemOffset < totalWidth) { int itemID = item->getTag() + (int)items.size(); item->setPositionX(item->getPositionX() + _reuseItemOffset); - CCLOG("itemPos = %f, itemID = %d, tempateID = %d", itemPos, itemID, i); + CCLOG("itemPos = %f, itemID = %d, templateID = %d", itemPos, itemID, i); this->updateItem(itemID, i); } } diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp index 51e755f11b..f24d7503cf 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp @@ -358,7 +358,7 @@ bool UIPageViewTouchPropagationTest::init() auto eventListener = EventListenerTouchOneByOne::create(); eventListener->onTouchBegan = [](Touch* touch, Event* event) -> bool{ - CCLOG("layout recieves touches"); + CCLOG("layout receives touches"); return true; }; _eventDispatcher->addEventListenerWithSceneGraphPriority(eventListener, this); @@ -985,7 +985,7 @@ bool UIPageViewIndicatorTest::init() Size widgetSize = _widget->getContentSize(); // Add a label in which the dragpanel events will be displayed - _displayValueLabel = Text::create("PageView indidcator custom texture\nscale : 0.5, index color: RED", "fonts/Marker Felt.ttf", 16); + _displayValueLabel = Text::create("PageView indicator custom texture\nscale : 0.5, index color: RED", "fonts/Marker Felt.ttf", 16); _displayValueLabel->setAnchorPoint(Vec2(0.5f, -1.0f)); _displayValueLabel->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f + diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp index 451313ade8..7ee1e7fe84 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp @@ -355,7 +355,7 @@ bool UIRichTextXMLColor::init() // RichText - _richText = RichText::createWithXML("Defaul color.red.greenred again.default again"); + _richText = RichText::createWithXML("Default color.red.greenred again.default again"); _richText->ignoreContentAdaptWithSize(false); _richText->setContentSize(Size(100, 100)); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.cpp index ade301bb65..ad05de8da0 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.cpp @@ -34,7 +34,7 @@ bool UIScene::init() _uiLayer->setPosition(Vec2((screenSize.width - rootSize.width) / 2, (screenSize.height - rootSize.height) / 2)); - // disable these widgets because they are confict with menu itmes created in `TestCase` + // disable these widgets because they are conflict with menu items created in `TestCase` auto restartButton = Helper::seekWidgetByName(_widget, "middle_Button"); restartButton->setVisible(false); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp index 41b8e71df6..e6e33fe5d2 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp @@ -355,7 +355,7 @@ bool UISliderNewEventCallbackTest::init() _uiLayer->addChild(_displayValueLabel); // Add the alert - Text* alert = Text::create("See console ouput for Slider Down and Up event.","fonts/Marker Felt.ttf",20); + Text* alert = Text::create("See console output for Slider Down and Up event.", "fonts/Marker Felt.ttf", 20); alert->setColor(Color3B(159, 168, 176)); alert->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f - alert->getContentSize().height * 3.75f)); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp index 0c9f515113..f50065118e 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp @@ -228,7 +228,7 @@ bool UITextTest_IgnoreConentSize::init() { Size widgetSize = _widget->getContentSize(); - Text* leftText = Text::create("ignore conent", + Text* leftText = Text::create("ignore content", "fonts/Marker Felt.ttf",10); leftText->setPosition(Vec2(widgetSize.width / 2.0f - 50, widgetSize.height / 2.0f)); @@ -240,7 +240,7 @@ bool UITextTest_IgnoreConentSize::init() _uiLayer->addChild(leftText); - Text* rightText = Text::create("ignore conent", + Text* rightText = Text::create("ignore content", "fonts/Marker Felt.ttf",10); rightText->setPosition(Vec2(widgetSize.width / 2.0f + 50, widgetSize.height / 2.0f)); @@ -274,7 +274,7 @@ bool UITextTest_Clone::init() { Size widgetSize = _widget->getContentSize(); - Text* singleText = Text::create("ignore conent", + Text* singleText = Text::create("ignore content", "fonts/Marker Felt.ttf", 30); singleText->setPosition(Vec2(widgetSize.width / 2.0f - 80, widgetSize.height / 2.0f)); diff --git a/tests/js-tests/src/GUITest/UICheckBoxTest/UICheckBoxTest.js b/tests/js-tests/src/GUITest/UICheckBoxTest/UICheckBoxTest.js index 25bc169193..6a438a6565 100644 --- a/tests/js-tests/src/GUITest/UICheckBoxTest/UICheckBoxTest.js +++ b/tests/js-tests/src/GUITest/UICheckBoxTest/UICheckBoxTest.js @@ -79,7 +79,7 @@ var UICheckBoxDefaultBehaviorTest = UIMainLayer.extend({ this._bottomDisplayLabel.setString(""); // Add the alert - var alert = new ccui.Text("Only left two can be cliked!","Marker Felt",20 ); + var alert = new ccui.Text("Only left two can be clicked!", "Marker Felt", 20); alert.setColor(cc.color(159, 168, 176)); alert.setPosition(cc.p(widgetSize.width / 2, widgetSize.height / 2 - alert.getContentSize().height * 1.75)); this._mainNode.addChild(alert); diff --git a/tests/js-tests/src/GUITest/UIPageViewTest/UIPageViewTest.js b/tests/js-tests/src/GUITest/UIPageViewTest/UIPageViewTest.js index f243e1ec51..fb458a8f4d 100644 --- a/tests/js-tests/src/GUITest/UIPageViewTest/UIPageViewTest.js +++ b/tests/js-tests/src/GUITest/UIPageViewTest/UIPageViewTest.js @@ -354,7 +354,7 @@ var UIPageViewTouchPropagationTest = UIMainLayer.extend({ // var eventListener = new cc.EventListenerTouchOneByOne(); // eventListener.onTouchBegan = function(touch, event){ -// cc.log("layout recieves touches"); +// cc.log("layout receives touches"); // return true; // }; // this._eventDispatcher.addEventListenerWithSceneGraphPriority(eventListener, this); @@ -738,7 +738,7 @@ var UIPageViewIndicatorTest = UIMainLayer.extend({ if(this._super()){ var widgetSize = this._widget.getContentSize(); - this._topDisplayLabel.setString("PageView indidcator custom texture\nscale : 0.5, index color: RED"); + this._topDisplayLabel.setString("PageView indicator custom texture\nscale : 0.5, index color: RED"); this._topDisplayLabel.setFontSize(14); this._topDisplayLabel.x = widgetSize.width / 2.0; this._topDisplayLabel.y = widgetSize.height / 2.0 + this._topDisplayLabel.height; diff --git a/tests/js-tests/src/GUITest/UIRichTextTest/UIRichTextTest.js b/tests/js-tests/src/GUITest/UIRichTextTest/UIRichTextTest.js index f4319146c8..5b018113e4 100644 --- a/tests/js-tests/src/GUITest/UIRichTextTest/UIRichTextTest.js +++ b/tests/js-tests/src/GUITest/UIRichTextTest/UIRichTextTest.js @@ -210,7 +210,7 @@ var UIRichTextXMLColor = UIMainLayer.extend({ // RichText var richText = new ccui.RichText(); - richText.initWithXML("Defaul color.red.greenred again.default again"); + richText.initWithXML("Default color.red.greenred again.default again"); richText.ignoreContentAdaptWithSize(false); richText.width = 120; diff --git a/tests/js-tests/src/GUITest/UITextTest/UITextTest.js b/tests/js-tests/src/GUITest/UITextTest/UITextTest.js index a1aa5cb29a..2b135d7562 100644 --- a/tests/js-tests/src/GUITest/UITextTest/UITextTest.js +++ b/tests/js-tests/src/GUITest/UITextTest/UITextTest.js @@ -146,7 +146,7 @@ var UITextTest_IgnoreConentSize = UIMainLayer.extend({ this._bottomDisplayLabel.setString(""); - var leftText = new ccui.Text("ignore conent", "Marker Felt",10); + var leftText = new ccui.Text("ignore content", "Marker Felt", 10); leftText.setPosition(cc.p(widgetSize.width / 2 - 50, widgetSize.height / 2)); leftText.ignoreContentAdaptWithSize(false); @@ -156,7 +156,7 @@ var UITextTest_IgnoreConentSize = UIMainLayer.extend({ leftText.setTouchEnabled(true); this._mainNode.addChild(leftText); - var rightText = new ccui.Text("ignore conent", "Marker Felt",10); + var rightText = new ccui.Text("ignore content", "Marker Felt", 10); rightText.setPosition(cc.p(widgetSize.width / 2 + 50, widgetSize.height / 2)); rightText.setString("Text line with break\nText line with break\nText line with break\nText line with break\n");