Exemple #1
0
        public void CrashRdx_RemoveRange_Argument()
        {
            var rd = new RankedDictionary <int, int>();

            rd.Add(3, 33); rd.Add(5, 55);
            rd.RemoveRange(1, 2);
        }
Exemple #2
0
        public void UnitRdx_RemoveRange()
        {
            var rd = new RankedDictionary <int, int> {
                Capacity = 7
            };

            for (int ii = 0; ii < 20; ++ii)
            {
                rd.Add(ii, -ii);
            }

            rd.RemoveRange(20, 0);
            Assert.AreEqual(20, rd.Count);

            rd.RemoveRange(12, 4);
            Assert.AreEqual(16, rd.Count);
#if DEBUG
            rd.SanityCheck();
#endif
        }
Exemple #3
0
        public void CrashRdx_RemoveRange_ArgumentOutOfRangeB()
        {
            var rd = new RankedDictionary <int, int>();

            rd.RemoveRange(0, -1);
        }