public void LimitTest() { myDouble limit1 = new myDouble(2, 1); Assert.IsTrue(limit1.Equals(x1)); myDouble limitn1 = new myDouble(-2, 1); Assert.IsTrue(limitn1.Equals(xn1)); myDouble limit11 = new myDouble(2, 1, -1); Assert.IsTrue(limit1.Equals(x1)); myDouble limitn11 = new myDouble(-2, 1, -1); Assert.IsTrue(limitn1.Equals(xn1)); myDouble limit1a = new myDouble(2); limit1a.UpperLimit = 1; Assert.IsTrue(limit1a.Equals(x1)); myDouble limitn1a = new myDouble(-2); limitn1a.LowerLimit = -1; Assert.IsTrue(limitn1a.Equals(xn1)); }
public void EqualsTest() { Assert.IsTrue(x1.Equals(x1)); Assert.IsTrue(x2.Equals(x2)); Assert.IsTrue(x1.Equals(y1)); Assert.IsTrue(x2.Equals(y2)); Assert.IsTrue(y1.Equals(x1)); Assert.IsTrue(y2.Equals(x2)); Assert.IsFalse(x1.Equals(y2)); Assert.IsFalse(x2.Equals(y1)); Assert.IsFalse(y1.Equals(x2)); Assert.IsFalse(y2.Equals(x1)); Assert.IsFalse(x1.Equals(n1)); Assert.IsFalse(y2.Equals(n2)); //Assert.IsFalse(x1.Equals(x1a)); //Assert.IsFalse(x1.Equals(x1b)); Assert.IsTrue(x1.Equals(x1c)); Assert.IsTrue(x1.Equals(x1d)); Assert.IsFalse(x1.Equals(x1e)); Assert.IsFalse(x1.Equals(x1f)); }