/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
strikethroughMapGet.Clear();
END_TEST;
+}
+
+int UtcDaliTextLabelCharacterSpacing(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliTextLabelCharacterSpacing ");
+
+ TextLabel textLabel = TextLabel::New();
+
+ textLabel.SetProperty(Actor::Property::SIZE, Vector2(150.0f, 300.f));
+
+ application.GetScene().Add(textLabel);
+ application.SendNotification();
+ application.Render();
+
+ textLabel.SetProperty(TextLabel::Property::TEXT, "Hi Experiment");
+ textLabel.SetProperty(DevelTextLabel::Property::CHARACTER_SPACING, 10.f);
+ DALI_TEST_EQUALS(textLabel.GetProperty<float>(DevelTextLabel::Property::CHARACTER_SPACING), 10.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextlabelParagraphTag(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextlabelParagraphTag");
+ TextLabel labelNewlineSeparator = TextLabel::New();
+ TextLabel labelParagraphTag = TextLabel::New();
+ DALI_TEST_CHECK(labelNewlineSeparator);
+ DALI_TEST_CHECK(labelParagraphTag);
+
+ application.GetScene().Add(labelNewlineSeparator);
+ application.GetScene().Add(labelParagraphTag);
+
+ //Same utterance uses new-line to split paragraphs should give similar results for paragraph tag.
+ labelNewlineSeparator.SetProperty(TextLabel::Property::MULTI_LINE, true);
+ labelNewlineSeparator.SetProperty(TextLabel::Property::ELLIPSIS, false);
+ labelNewlineSeparator.SetProperty(TextLabel::Property::ENABLE_MARKUP, true);
+ labelNewlineSeparator.SetProperty(Actor::Property::SIZE, Vector2(100.f, 50.f));
+ labelNewlineSeparator.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ labelNewlineSeparator.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ labelNewlineSeparator.SetProperty(TextLabel::Property::TEXT, "test paragraph tag \ntest paragraph tag \ntest paragraph tag ");
+
+ labelParagraphTag.SetProperty(TextLabel::Property::MULTI_LINE, true);
+ labelParagraphTag.SetProperty(TextLabel::Property::ELLIPSIS, false);
+ labelParagraphTag.SetProperty(TextLabel::Property::ENABLE_MARKUP, true);
+ labelParagraphTag.SetProperty(Actor::Property::SIZE, Vector2(100.f, 50.f));
+ labelParagraphTag.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ labelParagraphTag.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ labelParagraphTag.SetProperty(TextLabel::Property::TEXT, "test paragraph tag <p>test paragraph tag </p>test paragraph tag ");
+
+ application.SendNotification();
+ application.Render();
+
+ Vector3 textNaturalSizeNewlineSeparator = labelNewlineSeparator.GetNaturalSize();
+ Vector3 textNaturalSizeParagraphTag = labelParagraphTag.GetNaturalSize();
+
+ DALI_TEST_EQUALS(textNaturalSizeNewlineSeparator, textNaturalSizeParagraphTag, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;
}
\ No newline at end of file