It can return negative value.
Change-Id: I92cefc5a49836d2f73ba833104d164ea33c5d688
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
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");
}
}
}
}
}
- [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");
}
}
}
}
}
- [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");
}
}
}
}
}
- [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");
}
}
}
}
}
- [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");
}
}
}
}
}
- [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");
}
}
}
}
}
- [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
}
}
- [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");
}
}
}
}
}
- [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");
}
}
}
}
}
- [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");
}
}
}