Esempio n. 1
0
        public void BisectRight_ItemNotExists_Test()
        {
            var array = new[] { 0, 1, 3 };
            var index = SortingHelper.CalculateSortedInsertIndex(array, 2, SortMethod.BisectRight);

            Assert.Equal(2, index);
        }
Esempio n. 2
0
        public void BisectLeft_MultipleItemsExists_Test()
        {
            var array = new[] { 0, 1, 1, 1, 2, 3 };
            var index = SortingHelper.CalculateSortedInsertIndex(array, 1, SortMethod.BisectLeft);

            Assert.Equal(1, index);
        }