From 979a9be1f5b25ea90b44aa1593751794863129d4 Mon Sep 17 00:00:00 2001 From: WenhaiLin Date: Tue, 21 Jul 2015 17:09:27 +0800 Subject: [PATCH] Add test case for test font supported by FullType. --- .../cpp-tests/Classes/LabelTest/LabelTestNew.cpp | 15 +++++++++++++++ tests/cpp-tests/Classes/LabelTest/LabelTestNew.h | 10 ++++++++++ tests/cpp-tests/Resources/ccs-res | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp index 5590a1086a..5dd632b440 100644 --- a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp +++ b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp @@ -83,6 +83,7 @@ NewLabelTests::NewLabelTests() ADD_TEST_CASE(LabelAddChildTest); ADD_TEST_CASE(LabelIssue12775Test); ADD_TEST_CASE(LabelIssue11585Test); + ADD_TEST_CASE(LabelFullTypeFontTest); }; LabelTTFAlignmentNew::LabelTTFAlignmentNew() @@ -2070,3 +2071,17 @@ std::string LabelIssue11585Test::subtitle() const { return "The color of letter should not be overridden by fade action."; } + +LabelFullTypeFontTest::LabelFullTypeFontTest() +{ + auto center = VisibleRect::center(); + + auto label = Label::createWithTTF("Hello 中国", "XueJ2312F.ttf", 30); + label->setPosition(center.x, center.y); + addChild(label); +} + +std::string LabelFullTypeFontTest::title() const +{ + return "Test font supported by FullType"; +} diff --git a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h index e92e7e062d..9c5943394d 100644 --- a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h +++ b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h @@ -641,4 +641,14 @@ public: virtual std::string subtitle() const override; }; +class LabelFullTypeFontTest : public AtlasDemoNew +{ +public: + CREATE_FUNC(LabelFullTypeFontTest); + + LabelFullTypeFontTest(); + + virtual std::string title() const override; +}; + #endif diff --git a/tests/cpp-tests/Resources/ccs-res b/tests/cpp-tests/Resources/ccs-res index 37b53805de..a9a4475cbb 160000 --- a/tests/cpp-tests/Resources/ccs-res +++ b/tests/cpp-tests/Resources/ccs-res @@ -1 +1 @@ -Subproject commit 37b53805dedbfb1df8549a3e2417df5c47c134ff +Subproject commit a9a4475cbbcc613c3c964a09495a25d652f062f8