From 867642a15631ce96fd130f0db2ec621c635a1545 Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Wed, 13 Feb 2019 17:39:46 +0900 Subject: [PATCH] [NUI][Non-ACR] Fix Underline TCT Fail issue Change-Id: Ia37399be2ecfc14da378227814f3cf57cb160143 Signed-off-by: huiyu.eun --- .../Tizen.NUI.Tests/testcase/TSTextEditor.cs | 24 +++++++++------- .../Tizen.NUI.Tests/testcase/TSTextField.cs | 32 ++++++++++++---------- .../Tizen.NUI.Tests/testcase/TSTextLabel.cs | 24 +++++++++------- 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs index dbb5ee9..613227b 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs @@ -652,21 +652,25 @@ namespace Tizen.NUI.Tests TextEditor textEditor = new TextEditor(); PropertyMap map = new PropertyMap(); map.Clear(); - PropertyValue value = new PropertyValue("true"); + PropertyValue value = new PropertyValue(true); map.Insert("enable", value); - value = new PropertyValue("red"); + value = new PropertyValue(new Vector4(1.0f, 0.0f, 0.0f, 1.0f)); map.Insert("color", value); - value = new PropertyValue("1"); + value = new PropertyValue(0.1f); map.Insert("height", value); textEditor.Underline = map; Assert.AreEqual(map.Count(), textEditor.Underline.Count(), "Retrieved Underline's count should be equal to set value"); - string str1, str2; - for (uint index = 0u; index < map.Count(); index++) - { - map.GetValue(index).Get(out str1); - textEditor.Underline.GetValue(index).Get(out str2); - Assert.AreEqual(str1, str2, index + " : should be equals to the set value"); - } + + bool enable = false; + Vector4 color = new Vector4(); + float height = 0.0f; + textEditor.Underline.Find(0, "enable").Get(out enable); + textEditor.Underline.Find(0, "color").Get(color); + textEditor.Underline.Find(0, "height").Get(out height); + + Assert.AreEqual(true, enable, "enable : should be equals to the set value"); + Assert.AreEqual(1.0f, color.R, "color : should be equals to the set value"); + Assert.AreEqual(0.1f, height, "height : should be equals to the set value"); } [Test] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs index 5fd8ef6..d1f91cd 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs @@ -863,21 +863,25 @@ namespace Tizen.NUI.Tests TextField textField = new TextField(); PropertyMap map = new PropertyMap(); map.Clear(); - PropertyValue value = new PropertyValue("true"); - map.Add("enable", value); - value = new PropertyValue("red"); - map.Add("color", value); - value = new PropertyValue("1"); - map.Add("height", value); + PropertyValue value = new PropertyValue(true); + map.Insert("enable", value); + value = new PropertyValue(new Vector4(1.0f, 0.0f, 0.0f, 1.0f)); + map.Insert("color", value); + value = new PropertyValue(0.1f); + map.Insert("height", value); textField.Underline = map; - Assert.AreEqual(map.Count(), textField.Underline.Count(), "Retrieved Underline' count should be equal to set value"); - string str1, str2; - for (uint index = 0u; index < map.Count(); index++) - { - map.GetValue(index).Get(out str1); - textField.Underline.GetValue(index).Get(out str2); - Assert.AreEqual(str1, str2, index + " : should be equals to the set value"); - } + Assert.AreEqual(map.Count(), textField.Underline.Count(), "Retrieved Underline' count should be equal to set value"); + + bool enable = false; + Vector4 color = new Vector4(); + float height = 0.0f; + textField.Underline.Find(0, "enable").Get(out enable); + textField.Underline.Find(0, "color").Get(color); + textField.Underline.Find(0, "height").Get(out height); + + Assert.AreEqual(true, enable, "enable : should be equals to the set value"); + Assert.AreEqual(1.0f, color.R, "color : should be equals to the set value"); + Assert.AreEqual(0.1f, height, "height : should be equals to the set value"); } #if false // currently ACR is not yet proceed. temporarily blocked. diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs index 8a6371c..c696e4c 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs @@ -404,21 +404,25 @@ namespace Tizen.NUI.Tests TextLabel textLabel = new TextLabel(); PropertyMap map = new PropertyMap(); map.Clear(); - PropertyValue value = new PropertyValue("true"); + PropertyValue value = new PropertyValue(true); map.Insert("enable", value); - value = new PropertyValue("red"); + value = new PropertyValue(new Vector4(1.0f, 0.0f, 0.0f, 1.0f)); map.Insert("color", value); - value = new PropertyValue("1"); + value = new PropertyValue(0.1f); map.Insert("height", value); textLabel.Underline = map; Assert.AreEqual(map.Count(), textLabel.Underline.Count(), "Retrieved Underline should be equal to set value"); - string str1, str2; - for (uint index = 0u; index < map.Count(); index++) - { - map.GetValue(index).Get(out str1); - textLabel.Underline.GetValue(index).Get(out str2); - Assert.AreEqual(str1, str2, index + ": should be equals to the set value"); - } + + bool enable = false; + Vector4 color = new Vector4(); + float height = 0.0f; + textLabel.Underline.Find(0, "enable").Get(out enable); + textLabel.Underline.Find(0, "color").Get(color); + textLabel.Underline.Find(0, "height").Get(out height); + + Assert.AreEqual(true, enable, "enable : should be equals to the set value"); + Assert.AreEqual(1.0f, color.R, "color : should be equals to the set value"); + Assert.AreEqual(0.1f, height, "height : should be equals to the set value"); } [Test] -- 2.7.4