示例#1
0
        public void TestPixelUndoDifferentHashCode()
        {
            PixelHistoryTracker.PixelUndo undo1 = new PixelHistoryTracker.PixelUndo(0, 0, 0, 0xFF, 0xFE);
            PixelHistoryTracker.PixelUndo undo2 = new PixelHistoryTracker.PixelUndo(0, 1, 0, 0xFF, 0xFE);

            Assert.AreNotEqual(undo1.GetHashCode(), undo2.GetHashCode(), "PixelUndos of different coordinates must no have the same hash code");
        }
示例#2
0
        public void TestPixelUndoSameHashCode()
        {
            PixelHistoryTracker.PixelUndo undo1 = new PixelHistoryTracker.PixelUndo(0, 0, 0, 0xFF, 0xFE);
            PixelHistoryTracker.PixelUndo undo2 = new PixelHistoryTracker.PixelUndo(0, 0, 0, 0x00, 0xFE);

            Assert.AreEqual(undo1.GetHashCode(), undo2.GetHashCode(), "Equal PixelUndos of different old colors must have the same hash code");
        }