Пример #1
0
        public void ProgramPoint_Diff_Block()
        {
            var pp1 = new ProgramPoint(new TestBlock(), 1);
            var pp2 = new ProgramPoint(new TestBlock(), 1);

            pp2.Should().NotBe(pp1);
            pp2.GetHashCode().Should().NotBe(pp1.GetHashCode());
        }
Пример #2
0
        public void ProgramPoint_Diff_Block()
        {
            var pp1 = new ProgramPoint(new TestBlock(), 1);
            var pp2 = new ProgramPoint(new TestBlock(), 1);

            Assert.AreNotEqual(pp1, pp2);
            Assert.AreNotEqual(pp1.GetHashCode(), pp2.GetHashCode());
        }
Пример #3
0
        public void ProgramPoint_Diff_Block()
        {
            var pp1 = new ProgramPoint(new TestBlock(), 1);
            var pp2 = new ProgramPoint(new TestBlock(), 1);

            Assert.AreNotEqual(pp1, pp2);
            Assert.AreNotEqual(pp1.GetHashCode(), pp2.GetHashCode());
        }
Пример #4
0
        public void ProgramPoint_Diff_Offset()
        {
            var block = new TestBlock();
            var pp1   = new ProgramPoint(block, 1);
            var pp2   = new ProgramPoint(block, 2);

            pp2.Should().NotBe(pp1);
            pp2.GetHashCode().Should().NotBe(pp1.GetHashCode());
        }
Пример #5
0
        public void ProgramPoint_Equivalence()
        {
            var block = new TestBlock();
            var pp1   = new ProgramPoint(block, 1);
            var pp2   = new ProgramPoint(block, 1);

            pp2.Should().Be(pp1);
            pp2.GetHashCode().Should().Be(pp1.GetHashCode());
        }
Пример #6
0
        public void ProgramPoint_Equivalence()
        {
            var block = new TestBlock();
            var pp1 = new ProgramPoint(block, 1);
            var pp2 = new ProgramPoint(block, 1);

            Assert.AreEqual(pp1, pp2);
            Assert.AreEqual(pp1.GetHashCode(), pp2.GetHashCode());
        }
Пример #7
0
        public void ProgramPoint_Equivalence()
        {
            var block = new TestBlock();
            var pp1   = new ProgramPoint(block, 1);
            var pp2   = new ProgramPoint(block, 1);

            Assert.AreEqual(pp1, pp2);
            Assert.AreEqual(pp1.GetHashCode(), pp2.GetHashCode());
        }
Пример #8
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(Message.GetHashCode() + LangElement.Position.FirstOffset.GetHashCode() + FullFileName.GetHashCode()
            + Flag.GetHashCode() + ProgramPoint.GetHashCode());
 }