Ejemplo n.º 1
0
        public void FindNextSmallestTest()
        {
            CreateTree();
            int val;

            Assert.IsTrue(m_tree.FindNextSmallest(int.MaxValue, out val));
            Assert.AreEqual(5, val);
            Assert.IsTrue(m_tree.FindNextSmallest(5, out val));
            Assert.AreEqual(0, val);
            Assert.IsTrue(m_tree.FindNextSmallest(-5, out val));
            Assert.AreEqual(-999, val);
            Assert.IsFalse(m_tree.FindNextSmallest(-999, out val));
        }