Exemplo n.º 1
0
        public void TestEquality(float x, float y, float w, float h, Anchor2d anchor)
        {
            var rect1 = new Rect2d(x, y, w, h, anchor);
            var rect2 = new Rect2d(x, y, w, h, anchor);

            Assert.True(rect1 == rect2);
            Assert.True(rect1.Equals(rect2));

            rect1.X += Constants.FloatTolerance / 10;

            Assert.True(rect1 == rect2);
            Assert.True(rect1.Equals(rect2));

            rect1.X += Constants.FloatTolerance * 10;

            Assert.False(rect1 == rect2);
            Assert.False(rect1.Equals(rect2));
        }