X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-TextLabel.cpp;h=dd0b690ac65f8020447903708fda88347fd546c5;hb=HEAD;hp=47c7369fd026378a73844adae8d42fe1978403d2;hpb=58d3a9730318724443c28e6d62f26284a2945cea;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index 47c7369..aed1457 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -82,6 +82,7 @@ const char* const PROPERTY_NAME_ANCHOR_CLICKED_COLOR = "anchorClickedColor"; const char* const PROPERTY_NAME_REMOVE_FRONT_INSET = "removeFrontInset"; const char* const PROPERTY_NAME_REMOVE_BACK_INSET = "removeBackInset"; +const char* const PROPERTY_NAME_REMOVE_CUTOUT = "cutout"; const std::string DEFAULT_FONT_DIR("/resources/fonts"); const unsigned int EMOJI_FONT_SIZE = 3840u; // 60 * 64 @@ -365,6 +366,7 @@ int UtcDaliToolkitTextLabelGetPropertyP(void) DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_ANCHOR_CLICKED_COLOR) == DevelTextLabel::Property::ANCHOR_CLICKED_COLOR); DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_REMOVE_FRONT_INSET) == DevelTextLabel::Property::REMOVE_FRONT_INSET); DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_REMOVE_BACK_INSET) == DevelTextLabel::Property::REMOVE_BACK_INSET); + DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_REMOVE_CUTOUT) == DevelTextLabel::Property::CUTOUT); END_TEST; } @@ -953,6 +955,7 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) outlineMapSet["color"] = Color::RED; outlineMapSet["width"] = 2.0f; outlineMapSet["offset"] = Vector2(2.0f, 2.0f); + outlineMapSet["blurRadius"] = 3.0f; label.SetProperty(TextLabel::Property::OUTLINE, outlineMapSet); outlineMapGet = label.GetProperty(TextLabel::Property::OUTLINE); @@ -963,12 +966,13 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) outlineMapSet[Toolkit::DevelText::Outline::Property::COLOR] = Color::BLUE; outlineMapSet[Toolkit::DevelText::Outline::Property::WIDTH] = 3.0f; outlineMapSet[Toolkit::DevelText::Outline::Property::OFFSET] = Vector2(3.0f, 3.0f); + outlineMapSet[Toolkit::DevelText::Outline::Property::BLUR_RADIUS] = 4.0f; label.SetProperty(TextLabel::Property::OUTLINE, outlineMapSet); outlineMapGet = label.GetProperty(TextLabel::Property::OUTLINE); DALI_TEST_EQUALS(outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION); - std::vector outlineIndicesConversionTable = {"color", "width", "offset"}; + std::vector outlineIndicesConversionTable = {"color", "width", "offset", "blurRadius"}; DALI_TEST_EQUALS(DaliTestCheckMaps(outlineMapGet, outlineMapSet, outlineIndicesConversionTable), true, TEST_LOCATION); // Check the background property @@ -1039,6 +1043,14 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) application.SendNotification(); application.Render(); + // Check cutout Property + DALI_TEST_CHECK(!label.GetProperty(DevelTextLabel::Property::CUTOUT)); + label.SetProperty(DevelTextLabel::Property::CUTOUT, true); + DALI_TEST_CHECK(label.GetProperty(DevelTextLabel::Property::CUTOUT)); + + application.SendNotification(); + application.Render(); + END_TEST; } @@ -1792,6 +1804,16 @@ int UtcDaliToolkitTextLabelColorComponents(void) DALI_TEST_EQUALS(drawTrace.FindMethod("DrawArrays"), false, TEST_LOCATION); // Rendering should be skipped + label.SetProperty(DevelTextLabel::Property::CUTOUT, true); + + drawTrace.Reset(); + + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS(drawTrace.FindMethod("DrawArrays"), true, TEST_LOCATION); // When cutout is enabled, should not be skipped + + label.SetProperty(DevelTextLabel::Property::CUTOUT, false); label.SetProperty(TextLabel::Property::TEXT_COLOR, Color::RED); drawTrace.Reset(); @@ -1821,6 +1843,7 @@ int UtcDaliToolkitTextlabelTextStyle01(void) outlineMapSet["color"] = Color::BLUE; outlineMapSet["width"] = 2.0f; outlineMapSet["offset"] = "2 2"; + outlineMapSet["blurRadius"] = "3"; label.SetProperty(TextLabel::Property::OUTLINE, outlineMapSet); application.SendNotification();