Add log for font load validation
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TextLabel.cpp
index c810939..f7bf429 100644 (file)
@@ -644,6 +644,21 @@ int UtcDaliToolkitTextLabelSetPropertyP(void)
   DALI_TEST_EQUALS(strikethroughMapGet.Count(), strikethroughMapSet.Count(), TEST_LOCATION);
   DALI_TEST_EQUALS(DaliTestCheckMaps(strikethroughMapGet, strikethroughMapSet), true, TEST_LOCATION);
 
+  // Check the transparent strikethrough property for coverage.
+  strikethroughMapSet.Clear();
+  strikethroughMapSet.Insert("enable", true);
+  strikethroughMapSet.Insert("color", Color::TRANSPARENT);
+  strikethroughMapSet.Insert("height", 2.0f);
+
+  label.SetProperty(DevelTextLabel::Property::STRIKETHROUGH, strikethroughMapSet);
+
+  application.SendNotification();
+  application.Render();
+
+  strikethroughMapGet = label.GetProperty<Property::Map>(DevelTextLabel::Property::STRIKETHROUGH);
+  DALI_TEST_EQUALS(strikethroughMapGet.Count(), strikethroughMapSet.Count(), TEST_LOCATION);
+  DALI_TEST_EQUALS(DaliTestCheckMaps(strikethroughMapGet, strikethroughMapSet), true, TEST_LOCATION);
+
   strikethroughMapSet.Clear();
   strikethroughMapSet.Insert(Toolkit::DevelText::Strikethrough::Property::ENABLE, true);
   strikethroughMapSet.Insert(Toolkit::DevelText::Strikethrough::Property::COLOR, Color::RED);
@@ -803,6 +818,24 @@ int UtcDaliToolkitTextLabelSetPropertyP(void)
   DALI_TEST_EQUALS(underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION);
   DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet, underlineMapSet), true, TEST_LOCATION);
 
+  // Check the transparent double underline property for coverage.
+  underlineMapSet.Clear();
+  underlineMapSet.Insert("enable", true);
+  underlineMapSet.Insert("color", Color::TRANSPARENT);
+  underlineMapSet.Insert("height", 1);
+  underlineMapSet.Insert("type", Text::Underline::DOUBLE);
+  underlineMapSet.Insert("dashWidth", 2);
+  underlineMapSet.Insert("dashGap", 1);
+
+  label.SetProperty(TextLabel::Property::UNDERLINE, underlineMapSet);
+
+  application.SendNotification();
+  application.Render();
+
+  underlineMapGet = label.GetProperty<Property::Map>(TextLabel::Property::UNDERLINE);
+  DALI_TEST_EQUALS(underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION);
+  DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet, underlineMapSet), true, TEST_LOCATION);
+
   underlineMapSet.Clear();
   underlineMapSet.Insert(Toolkit::DevelText::Underline::Property::ENABLE, true);
   underlineMapSet.Insert(Toolkit::DevelText::Underline::Property::COLOR, Color::GREEN);
@@ -931,6 +964,19 @@ int UtcDaliToolkitTextLabelSetPropertyP(void)
   DALI_TEST_EQUALS(backgroundMapGet.Count(), backgroundMapSet.Count(), TEST_LOCATION);
   DALI_TEST_EQUALS(DaliTestCheckMaps(backgroundMapGet, backgroundMapSet), true, TEST_LOCATION);
 
+  // Check the transparent background property for coverage
+  backgroundMapSet.Clear();
+  backgroundMapSet["enable"] = true;
+  backgroundMapSet["color"]  = Color::TRANSPARENT;
+  label.SetProperty(DevelTextLabel::Property::BACKGROUND, backgroundMapSet);
+
+  application.SendNotification();
+  application.Render();
+
+  backgroundMapGet = label.GetProperty<Property::Map>(DevelTextLabel::Property::BACKGROUND);
+  DALI_TEST_EQUALS(backgroundMapGet.Count(), backgroundMapSet.Count(), TEST_LOCATION);
+  DALI_TEST_EQUALS(DaliTestCheckMaps(backgroundMapGet, backgroundMapSet), true, TEST_LOCATION);
+
   backgroundMapSet.Clear();
   backgroundMapSet[Toolkit::DevelText::Background::Property::ENABLE] = true;
   backgroundMapSet[Toolkit::DevelText::Background::Property::COLOR]  = Color::GREEN;
@@ -1094,6 +1140,7 @@ int UtcDaliToolkitTextLabelEmojisP(void)
 
   // EMOJI Sequences case for coverage.
   std::string emojiSequences =
+    "Glyphs not included in the font &#xf01a;&#xf01b;&#xf01c;&#xf01d;&#xf01e;&#xf01f;\n"   //case for coverage when glyph is not included in the font
     "Text VS15 &#x262a;&#xfe0e;\n"                                                         //text presentation sequence and selector
     "Color VS16 &#x262a;&#xfe0f;\n"                                                        //emoji presentation sequence and selector
     "Default &#x262a; \n"                                                                  //default presentation
@@ -2041,6 +2088,13 @@ int UtcDaliToolkitTextlabelMaxTextureSet(void)
   // Check if the number of renderers is greater than 1.
   DALI_TEST_CHECK(label.GetRendererCount() > 1u);
 
+  // Coverage test for case of layoutSize is bigger than maxTextureSize
+  float max_value = static_cast<float>(std::numeric_limits<uint16_t>::max());
+  label.SetProperty(Actor::Property::SIZE, Vector2(max_value, 30.0f));
+  application.SendNotification();
+  application.Render();
+
+
   END_TEST;
 }