Merge "Added IGNORE_SPACES_AFTER_TEXT property" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TextLabel.cpp
index db4f6bd..f19cb12 100644 (file)
@@ -1047,6 +1047,21 @@ int UtcDaliToolkitTextlabelEllipsis(void)
     tet_result(TET_FAIL);
   }
 
+  label.SetProperty( TextLabel::Property::TEXT, "Hello world                                        " );
+  label.SetProperty( DevelTextLabel::Property::IGNORE_SPACES_AFTER_TEXT, false );
+  label.SetSize( 400.0f, 10.f );
+
+  try
+  {
+    // Render the text.
+    application.SendNotification();
+    application.Render();
+  }
+  catch( ... )
+  {
+    tet_result(TET_FAIL);
+  }
+
   END_TEST;
 }
 
@@ -1158,6 +1173,15 @@ int UtcDaliToolkitTextLabelColorComponents(void)
 
   DALI_TEST_EQUALS( drawTrace.FindMethod( "DrawArrays" ), false, TEST_LOCATION ); // Rendering should be skipped
 
+  label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::RED );
+
+  drawTrace.Reset();
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( drawTrace.FindMethod( "DrawArrays" ), true, TEST_LOCATION ); // Should be rendered again
+
   END_TEST;
 }
 
@@ -1310,4 +1334,4 @@ int UtcDaliToolkitTextlabelVerticalLineAlignment(void)
   DALI_TEST_EQUALS( label.GetProperty< int >( DevelTextLabel::Property::VERTICAL_LINE_ALIGNMENT ), static_cast< int >( Toolkit::DevelText::VerticalLineAlignment::BOTTOM ), TEST_LOCATION );
 
   END_TEST;
-}
+}
\ No newline at end of file