public void InstanceHasNotSameHashCodeAsCompletelyDifferent() { var access1 = new ArrayAccess(_CreateFlowNode(), _CreateArrayExpression(), true); var access2 = new ArrayAccess(_CreateFlowNode(), _CreateArrayExpression(), false); Assert.AreNotEqual(access1.GetHashCode(), access2.GetHashCode()); }
public void InstanceHasNotSameHashCodeAsOtherWithDifferenExpression() { var node = _CreateFlowNode(); var access1 = new ArrayAccess(node, _CreateArrayExpression(), false); var access2 = new ArrayAccess(node, _CreateArrayExpression(), false); Assert.AreNotEqual(access1.GetHashCode(), access2.GetHashCode()); }
public void InstancesHaveNotSameHashCodeIfOneIsWritingAndOtherNot() { var expression = _CreateArrayExpression(); var node = _CreateFlowNode(); var access1 = new ArrayAccess(node, expression, false); var access2 = new ArrayAccess(node, expression, true); Assert.AreNotEqual(access1.GetHashCode(), access2.GetHashCode()); }
public void InstanceHasSameHashCodeAsOtherWithSameInformation() { var expression = _CreateArrayExpression(); var node = _CreateFlowNode(); var access1 = new ArrayAccess(node, expression, true); var access2 = new ArrayAccess(node, expression, true); Assert.AreEqual(access1.GetHashCode(), access2.GetHashCode()); }
public void InstanceHasSameHashCodeAsItself() { var access = new ArrayAccess(_CreateFlowNode(), _CreateArrayExpression(), false); Assert.AreEqual(access.GetHashCode(), access.GetHashCode()); }