Esempio n. 1
0
        public void InstanceHasNotSameHashCodeAsCompletelyDifferent()
        {
            var access1 = new ArrayAccess(_CreateFlowNode(), _CreateArrayExpression(), true);
            var access2 = new ArrayAccess(_CreateFlowNode(), _CreateArrayExpression(), false);

            Assert.AreNotEqual(access1.GetHashCode(), access2.GetHashCode());
        }
Esempio n. 2
0
        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());
        }
Esempio n. 3
0
        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());
        }
Esempio n. 4
0
        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());
        }
Esempio n. 5
0
        public void InstanceHasSameHashCodeAsItself()
        {
            var access = new ArrayAccess(_CreateFlowNode(), _CreateArrayExpression(), false);

            Assert.AreEqual(access.GetHashCode(), access.GetHashCode());
        }