[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 67a4db45c6cc01c4b08483968b9dc65b006daafc..2a5676f0a194e2571e0ca883ac62c1f54ec3f843 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 c68b47cf4eb8baa2eec65388ba798be105db2b72..27299b7d0ed98e7c195f285d50e0105ef248a9b1 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 ad389e7d148610975d1202ef55bcbaf6027c162d..e579e3a2e5c285fbcbab18109936b6c00928e911 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 075178535653d6c0bcbdc126e53199cfc54b0abd..37962d49e636cca64b1e5a68d677b61faae32ebb 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 2c334fded7bd34c8e8155436f3bf7642c0343fc3..372112c4b477a94005b75d17422a4f1c3b8385a5 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 99ffff8f79d54a11d8f4000b429c908d96246384..559cc0e04f8e6b4e6f48c46147e7101bb7b7d6ed 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 a5034c7dea4e05646f1f97ca66f6f03769daa001..07f95dbe0451f9dfe21071f18675d3a8c6330386 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 52a875554ae995d81ee81f79950f3f5757ed6592..f15ae9cfb5fd50af946a6f7c7a58b564322b7817 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 c6fc67c065d0bdad5bd13e258cacc6b2ec02bd81..ed91ea23e267dfdcc5be3304fc523a7392db7937 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 a3ffebfd88ae549671cd8c46c0c8b1d28745ff08..582f9bebe387d6be341cf16bf5c1edc7354ff3f6 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");
         }
     }
 }