public void Test()
        {
            PatternMergeMatrix lPatternMergeMatrix = new PatternMergeMatrix(9);

            lPatternMergeMatrix.Replace(2, 3);
            lPatternMergeMatrix.Replace(1, 2);
            lPatternMergeMatrix.Replace(7, 8);

            lPatternMergeMatrix.Compact();

            Assert.AreEqual(lPatternMergeMatrix[1], 3, "1->2->3 != 1->3");
            Assert.AreEqual(lPatternMergeMatrix[7], 8, "7->8 != 7->8");
            Assert.IsFalse(lPatternMergeMatrix.IsConflicted());

            lPatternMergeMatrix.Replace(1, 5);
            lPatternMergeMatrix.Compact();
            Assert.IsTrue(lPatternMergeMatrix.IsConflicted());
        }
Esempio n. 2
0
        public void Test()
        {
            PatternMergeMatrix lPatternMergeMatrix = new PatternMergeMatrix(9);

            lPatternMergeMatrix.Replace(2, 3);
            lPatternMergeMatrix.Replace(1, 2);
            lPatternMergeMatrix.Replace(7, 8);

            lPatternMergeMatrix.Compact();

            Assert.AreEqual(lPatternMergeMatrix[1], 3, "1->2->3 != 1->3");
            Assert.AreEqual(lPatternMergeMatrix[7], 8, "7->8 != 7->8");
            Assert.IsFalse(lPatternMergeMatrix.IsConflicted());

            lPatternMergeMatrix.Replace(1, 5);
            lPatternMergeMatrix.Compact();
            Assert.IsTrue(lPatternMergeMatrix.IsConflicted());
        }