[Non-ACR][NUI] Fix GetHashcode checker 87/203687/2
authorhuiyu.eun <huiyu.eun@samsung.com>
Wed, 17 Apr 2019 02:10:15 +0000 (11:10 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Wed, 17 Apr 2019 03:11:30 +0000 (12:11 +0900)
It can return negative value.

Change-Id: I92cefc5a49836d2f73ba833104d164ea33c5d688
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSPosition2D.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector2.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector3.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSRelativeVector4.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize2D.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector2.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector3.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSVector4.cs

index 67a4db4..2a5676f 100755 (executable)
@@ -794,20 +794,21 @@ namespace Tizen.NUI.Tests
             Assert.AreEqual(position.Z, vector.Z, "The value of Z is not correct.");
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.Position.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.Position.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var position = new Position(10.0f, 20.0f, 30.0f);
+            var hash = position.GetHashCode();
             Assert.IsNotNull(position, "Can't create success object Position");
-            Assert.IsInstanceOf<Position>(position, "Should be an instance of Position type.");\r
-            Assert.GreaterOrEqual(position.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<Position>(position, "Should be an instance of Position type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }
index c68b47c..27299b7 100755 (executable)
@@ -381,20 +381,21 @@ namespace Tizen.NUI.Tests
             }
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.Position2D.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.Position2D.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var position = new Position2D(10, 20);
+            var hash = position.GetHashCode();
             Assert.IsNotNull(position, "Can't create success object Position2D");
-            Assert.IsInstanceOf<Position2D>(position, "Should be an instance of Position2D type.");\r
-            Assert.GreaterOrEqual(position.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<Position2D>(position, "Should be an instance of Position2D type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }
index ad389e7..e579e3a 100755 (executable)
@@ -343,20 +343,21 @@ namespace Tizen.NUI.Tests
             }
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.RelativeVector2.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.RelativeVector2.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var vector1 = new RelativeVector2(1.0f, 0.0f);
+            var hash = vector1.GetHashCode();
             Assert.IsNotNull(vector1, "Can't create success object RelativeVector2");
-            Assert.IsInstanceOf<RelativeVector2>(vector1, "Should be an instance of RelativeVector2 type.");\r
-            Assert.GreaterOrEqual(vector1.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<RelativeVector2>(vector1, "Should be an instance of RelativeVector2 type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }
index 0751785..37962d4 100755 (executable)
@@ -373,20 +373,21 @@ namespace Tizen.NUI.Tests
             }
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.RelativeVector3.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.RelativeVector3.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var vector1 = new RelativeVector3(0.5f, 0.6f, 0.7f);
+            var hash = vector1.GetHashCode();
             Assert.IsNotNull(vector1, "Can't create success object RelativeVector3");
-            Assert.IsInstanceOf<RelativeVector3>(vector1, "Should be an instance of RelativeVector3 type.");\r
-            Assert.GreaterOrEqual(vector1.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<RelativeVector3>(vector1, "Should be an instance of RelativeVector3 type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }
index 2c334fd..372112c 100755 (executable)
@@ -406,20 +406,21 @@ namespace Tizen.NUI.Tests
             }
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.RelativeVector4.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.RelativeVector4.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var vector1 = new RelativeVector4(10.0f, 20.0f, 30.0f, 40.0f);
+            var hash = vector1.GetHashCode();
             Assert.IsNotNull(vector1, "Can't create success object RelativeVector4");
-            Assert.IsInstanceOf<RelativeVector4>(vector1, "Should be an instance of RelativeVector4 type.");\r
-            Assert.GreaterOrEqual(vector1.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<RelativeVector4>(vector1, "Should be an instance of RelativeVector4 type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }
index 99ffff8..559cc0e 100755 (executable)
@@ -393,20 +393,21 @@ namespace Tizen.NUI.Tests
             }
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.Size.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.Size.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var size = new Size(10.0f, 20.0f, 30.0f);
+            var hash = size.GetHashCode();
             Assert.IsNotNull(size, "Can't create success object Size");
-            Assert.IsInstanceOf<Size>(size, "Should be an instance of Size type.");\r
-            Assert.GreaterOrEqual(size.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<Size>(size, "Should be an instance of Size type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }
index a5034c7..07f95db 100755 (executable)
@@ -330,20 +330,21 @@ namespace Tizen.NUI.Tests
             }
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.Size2D.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.Size2D.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var size = new Size2D(10, 20);
+            var hash = size.GetHashCode();
             Assert.IsNotNull(size, "Can't create success object Size2D");
-            Assert.IsInstanceOf<Size2D>(size, "Should be an instance of Size2D type.");\r
-            Assert.GreaterOrEqual(size.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<Size2D>(size, "Should be an instance of Size2D type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }
\ No newline at end of file
index 52a8755..f15ae9c 100755 (executable)
@@ -513,20 +513,21 @@ namespace Tizen.NUI.Tests
             }
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.Vector2.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.Vector2.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var vector = new Vector2(10.0f, 20.0f);
+            var hash = vector.GetHashCode();
             Assert.IsNotNull(vector, "Can't create success object Vector2");
-            Assert.IsInstanceOf<Vector2>(vector, "Should be an instance of Vector2 type.");\r
-            Assert.GreaterOrEqual(vector.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<Vector2>(vector, "Should be an instance of Vector2 type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }
index c6fc67c..ed91ea2 100755 (executable)
@@ -654,20 +654,21 @@ namespace Tizen.NUI.Tests
             }
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.Vector3.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.Vector3.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var vector = new Vector3(10.0f, 20.0f, 30.0f);
+            var hash = vector.GetHashCode();
             Assert.IsNotNull(vector, "Can't create success object Vector3");
-            Assert.IsInstanceOf<Vector3>(vector, "Should be an instance of Vector3 type.");\r
-            Assert.GreaterOrEqual(vector.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<Vector3>(vector, "Should be an instance of Vector3 type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }
index a3ffebf..582f9be 100755 (executable)
@@ -641,20 +641,21 @@ namespace Tizen.NUI.Tests
             }
         }
 
-        [Test]\r
-        [Category("P1")]\r
-        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]\r
-        [Property("SPEC", "Tizen.NUI.Vector4.GetHashCode M")]\r
-        [Property("SPEC_URL", "-")]\r
-        [Property("CRITERIA", "MR")]\r
-        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]\r
-        public void GetHashCode_CHECK_RETURN_VALUE()\r
-        {\r
-            /* TEST CODE */\r
+        [Test]
+        [Category("P1")]
+        [Description("Test GetHashCode. Check whether GetHashCode returns expected value or not.")]
+        [Property("SPEC", "Tizen.NUI.Vector4.GetHashCode M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")]
+        public void GetHashCode_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
             var vector = new Vector4(10.0f, 20.0f, 30.0f, 40.0f);
+            var hash = vector.GetHashCode();
             Assert.IsNotNull(vector, "Can't create success object Vector4");
-            Assert.IsInstanceOf<Vector4>(vector, "Should be an instance of Vector4 type.");\r
-            Assert.GreaterOrEqual(vector.GetHashCode(), 0, "Should be true");\r
+            Assert.IsInstanceOf<Vector4>(vector, "Should be an instance of Vector4 type.");
+            Assert.IsTrue(hash >= Int32.MinValue && hash <= Int32.MaxValue, "The value of hash is out of Integer range");
         }
     }
 }