Exemple #1
0
        public void ComparisonOperators()
        {
            TilesetSource blue  = new TilesetSource("well0000.bmp", 1);
            TilesetSource well0 = new TilesetSource("well0000.bmp", 1);
            TilesetSource well1 = new TilesetSource("well0001.bmp", 200);

            // Note: Internally EXPECT_EQ uses `operator ==`
            Assert.AreEqual(blue, well0);
            Assert.AreEqual(well0, well0);
            Assert.AreEqual(well1, well1);

            // Note: Internally EXPECT_NE uses `operator !=`
            Assert.AreNotEqual(well0, well1);
            Assert.AreNotEqual(well1, well0);
        }
        public override bool Equals(object obj)
        {
            TilesetSource rhs = obj as TilesetSource;

            return(this == rhs);
        }