Ejemplo n.º 1
0
        public void TestCompareTo()
        {
            RedBlackTree <int, string> tree1 = GetTestTree();
            RedBlackTree <int, string> tree2 = new RedBlackTree <int, string>();

            Assert.AreEqual(tree1.CompareTo(tree2), 1);
            Assert.AreEqual(tree2.CompareTo(tree1), -1);
            Assert.AreEqual(tree1.CompareTo(tree1), 0);

            Assert.AreEqual(tree1.CompareTo(new object()), -1);
        }