+}
+
+int UtcDaliToolkitTextFieldStrikethroughGeneration(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextFieldStrikethroughGeneration");
+
+ TextField textField = TextField::New();
+ textField.SetProperty(TextField::Property::TEXT, "Test");
+ textField.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ textField.SetProperty(TextField::Property::POINT_SIZE, 10);
+ textField.SetProperty(TextField::Property::FONT_FAMILY, "DejaVu Sans");
+
+ application.GetScene().Add(textField);
+ application.SendNotification();
+ application.Render();
+
+ Property::Map strikethroughMapSet;
+ Property::Map strikethroughMapGet;
+
+ strikethroughMapSet.Insert("enable", true);
+ strikethroughMapSet.Insert("color", Color::RED);
+ strikethroughMapSet.Insert("height", 2.0f);
+
+ // Check the strikethrough property
+ textField.SetProperty(DevelTextField::Property::STRIKETHROUGH, strikethroughMapSet);
+ strikethroughMapGet = textField.GetProperty<Property::Map>(DevelTextField::Property::STRIKETHROUGH);
+ textField.SetProperty(TextField::Property::TEXT, "Test1");
+ DALI_TEST_EQUALS(strikethroughMapGet.Count(), strikethroughMapSet.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(strikethroughMapGet, strikethroughMapSet), true, TEST_LOCATION);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ strikethroughMapSet.Clear();
+ strikethroughMapGet.Clear();
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextFieldInputStrikethroughGeneration(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextFieldInputStrikethroughGeneration");
+
+ TextField textField = TextField::New();
+ textField.SetProperty(TextField::Property::TEXT, "Test");
+ textField.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ textField.SetProperty(TextField::Property::POINT_SIZE, 10);
+ textField.SetProperty(TextField::Property::FONT_FAMILY, "DejaVu Sans");
+
+ application.GetScene().Add(textField);
+ application.SendNotification();
+ application.Render();
+
+ std::string strikethroughSettings1("{\"enable\":\"true\",\"color\":\"red\",\"height\":\"2\"}");
+
+ // Check the strikethrough property
+ textField.SetProperty(DevelTextField::Property::INPUT_STRIKETHROUGH, strikethroughSettings1);
+ textField.SetProperty(TextField::Property::TEXT, "Test1");
+ DALI_TEST_EQUALS(textField.GetProperty<std::string>(DevelTextField::Property::INPUT_STRIKETHROUGH), strikethroughSettings1, TEST_LOCATION);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextFieldUnderlineTypesGeneration1(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextFieldUnderlineTypesGeneration1");
+ TextField field = TextField::New();
+ field.SetProperty(TextField::Property::TEXT, "Test");
+ field.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ field.SetProperty(TextField::Property::POINT_SIZE, 10);
+ field.SetProperty(TextField::Property::FONT_FAMILY, "DejaVu Sans");
+
+ application.GetScene().Add(field);
+ application.SendNotification();
+ application.Render();
+
+ Property::Map underlineMapSet;
+ Property::Map underlineMapGet;
+
+ underlineMapSet.Insert("enable", true);
+ underlineMapSet.Insert("color", Color::RED);
+ underlineMapSet.Insert("height", 1);
+ underlineMapSet.Insert("type", Text::Underline::SOLID);
+ underlineMapSet.Insert("dashWidth", 2);
+ underlineMapSet.Insert("dashGap", 1);
+
+ // Check the underline property
+ field.SetProperty(TextField::Property::UNDERLINE, underlineMapSet);
+
+ underlineMapGet = field.GetProperty<Property::Map>(TextField::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet, underlineMapSet), true, TEST_LOCATION);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ underlineMapSet.Clear();
+ underlineMapGet.Clear();
+
+ underlineMapSet.Insert("enable", true);
+ underlineMapSet.Insert("color", Color::BLUE);
+ underlineMapSet.Insert("height", 1);
+ underlineMapSet.Insert("type", Text::Underline::DASHED);
+ underlineMapSet.Insert("dashWidth", 4);
+ underlineMapSet.Insert("dashGap", 2);
+
+ // Check the dashed underline property
+ field.SetProperty(TextField::Property::UNDERLINE, underlineMapSet);
+
+ underlineMapGet = field.GetProperty<Property::Map>(TextField::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet, underlineMapSet), true, TEST_LOCATION);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ underlineMapSet.Clear();
+ underlineMapGet.Clear();
+
+ underlineMapSet.Insert("enable", true);
+ underlineMapSet.Insert("color", Color::BLUE);
+ underlineMapSet.Insert("height", 1);
+ underlineMapSet.Insert("type", Text::Underline::DOUBLE);
+ underlineMapSet.Insert("dashWidth", 4);
+ underlineMapSet.Insert("dashGap", 2);
+
+ // Check the dashed underline property
+ field.SetProperty(TextField::Property::UNDERLINE, underlineMapSet);
+
+ underlineMapGet = field.GetProperty<Property::Map>(TextField::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet, underlineMapSet), true, TEST_LOCATION);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ underlineMapSet.Clear();
+ underlineMapGet.Clear();
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextFieldUnderlineTypesGeneration2(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextFieldUnderlineTypesGeneration2");
+
+ TextField field1 = TextField::New();
+ field1.SetProperty(TextField::Property::TEXT, "Test");
+ field1.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ field1.SetProperty(TextField::Property::POINT_SIZE, 10);
+ field1.SetProperty(TextField::Property::FONT_FAMILY, "DejaVu Sans");
+
+ Property::Map underlineMapSet1;
+ Property::Map underlineMapGet1;
+
+ underlineMapSet1.Insert("enable", true);
+ underlineMapSet1.Insert("color", Color::RED);
+ underlineMapSet1.Insert("height", 1);
+ underlineMapSet1.Insert("type", Text::Underline::SOLID);
+ underlineMapSet1.Insert("dashWidth", 2);
+ underlineMapSet1.Insert("dashGap", 1);
+
+ // Check the underline property
+ field1.SetProperty(TextField::Property::UNDERLINE, underlineMapSet1);
+
+ underlineMapGet1 = field1.GetProperty<Property::Map>(TextField::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet1.Count(), underlineMapSet1.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet1, underlineMapSet1), true, TEST_LOCATION);
+
+ application.GetScene().Add(field1);
+ application.SendNotification();
+ application.Render();
+
+ TextField field2 = TextField::New();
+ field2.SetProperty(TextField::Property::TEXT, "Test");
+ field2.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ field2.SetProperty(TextField::Property::POINT_SIZE, 10);
+ field2.SetProperty(TextField::Property::FONT_FAMILY, "DejaVu Sans");
+
+ Property::Map underlineMapSet2;
+ Property::Map underlineMapGet2;
+
+ underlineMapSet2.Insert("enable", true);
+ underlineMapSet2.Insert("color", Color::BLUE);
+ underlineMapSet2.Insert("height", 1);
+ underlineMapSet2.Insert("type", Text::Underline::DASHED);
+ underlineMapSet2.Insert("dashWidth", 4);
+ underlineMapSet2.Insert("dashGap", 2);
+
+ // Check the dashed underline property
+ field2.SetProperty(TextField::Property::UNDERLINE, underlineMapSet2);
+
+ underlineMapGet2 = field2.GetProperty<Property::Map>(TextField::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet2.Count(), underlineMapSet2.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet2, underlineMapSet2), true, TEST_LOCATION);
+
+ application.GetScene().Add(field2);
+ application.SendNotification();
+ application.Render();
+
+ TextField field3 = TextField::New();
+ field3.SetProperty(TextField::Property::TEXT, "Test");
+ field3.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ field3.SetProperty(TextField::Property::POINT_SIZE, 10);
+ field3.SetProperty(TextField::Property::FONT_FAMILY, "DejaVu Sans");
+
+ Property::Map underlineMapSet3;
+ Property::Map underlineMapGet3;
+
+ underlineMapSet3.Insert("enable", true);
+ underlineMapSet3.Insert("color", Color::BLUE);
+ underlineMapSet3.Insert("height", 1);
+ underlineMapSet3.Insert("type", Text::Underline::DOUBLE);
+ underlineMapSet3.Insert("dashWidth", 4);
+ underlineMapSet3.Insert("dashGap", 2);
+
+ // Check the dashed underline property
+ field3.SetProperty(TextField::Property::UNDERLINE, underlineMapSet3);
+
+ underlineMapGet3 = field3.GetProperty<Property::Map>(TextField::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet3.Count(), underlineMapSet3.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet3, underlineMapSet3), true, TEST_LOCATION);
+
+ application.GetScene().Add(field3);
+
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;
+}
+
+int UtcDaliTextFieldCharacterSpacing(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliTextFieldCharacterSpacing ");
+
+ TextField textField = TextField::New();
+
+ textField.SetProperty(Actor::Property::SIZE, Vector2(150.0f, 300.f));
+
+ application.GetScene().Add(textField);
+ application.SendNotification();
+ application.Render();
+
+ textField.SetProperty(TextField::Property::TEXT, "Hi Experiment");
+ textField.SetProperty(DevelTextField::Property::CHARACTER_SPACING, 10.f);
+ DALI_TEST_EQUALS(textField.GetProperty<float>(DevelTextField::Property::CHARACTER_SPACING), 10.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextFieldUnderlineTypesGeneration3(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextFieldUnderlineTypesGeneration3");
+
+ TextField field1 = TextField::New();
+ field1.SetProperty(TextField::Property::TEXT, "Test1");
+ field1.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ field1.SetProperty(TextField::Property::POINT_SIZE, 10);
+ field1.SetProperty(TextField::Property::FONT_FAMILY, "DejaVu Sans");
+
+ Property::Map underlineMapSet1;
+ Property::Map underlineMapGet1;
+
+ underlineMapSet1.Insert("enable", true);
+ underlineMapSet1.Insert("color", Color::RED);
+ underlineMapSet1.Insert("height", 1);
+ underlineMapSet1.Insert("type", Text::Underline::SOLID);
+ underlineMapSet1.Insert("dashWidth", 2);
+ underlineMapSet1.Insert("dashGap", 1);
+
+ // Check the underline property
+ field1.SetProperty(TextField::Property::UNDERLINE, underlineMapSet1);
+ //field1.SetProperty( TextField::Property::TEXT, "Test2" );
+
+ underlineMapGet1 = field1.GetProperty<Property::Map>(TextField::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet1.Count(), underlineMapSet1.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet1, underlineMapSet1), true, TEST_LOCATION);
+
+ application.GetScene().Add(field1);
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;