Exemplo n.º 1
0
        public void compare_to() {
            var a = new Point3(1, 2, 0);
            var b = new Point3(3, 4, 10);
            var d = new Point3(1, 2, 0);
            var c = new Point3(1, 1, 1);

            Assert.True(a.CompareTo(b) < 0);
            Assert.True(b.CompareTo(a) > 0);
            Assert.NotEqual(a, b);
            Assert.True(c.CompareTo(a) < 0);
            Assert.True(a.CompareTo(c) > 0);
            Assert.NotEqual(a, c);
            Assert.Equal(0, a.CompareTo(d));
        }
Exemplo n.º 2
0
        public void compare_to()
        {
            var a = new Point3(1, 2, 0);
            var b = new Point3(3, 4, 10);
            var d = new Point3(1, 2, 0);
            var c = new Point3(1, 1, 1);

            Assert.True(a.CompareTo(b) < 0);
            Assert.True(b.CompareTo(a) > 0);
            Assert.NotEqual(a, b);
            Assert.True(c.CompareTo(a) < 0);
            Assert.True(a.CompareTo(c) > 0);
            Assert.NotEqual(a, c);
            Assert.Equal(0, a.CompareTo(d));
        }