Ejemplo n.º 1
0
        public void BinarySearchCounter()
        {
            int searchCount;
            var searchArray = new int[] { 4, 6, 7, 8, 12, 18, 24, 45, 66, 78, 193, 205, 318, 500, 1024, 888923 };
            var index       = SearchUtil.IndexOf(searchArray, 6, out searchCount);

            Assert.AreEqual(1, index);
            Assert.AreEqual(3, searchCount);
        }