Beispiel #1
0
        public void CrashRb_RemoveRange_Argument()
        {
            var rb = new RankedBag <int> {
                3, 5
            };

            rb.RemoveRange(1, 2);
        }
Beispiel #2
0
        public void UnitRb_RemoveRange()
        {
            var rb = new RankedBag <int> {
                Capacity = 7
            };

            for (int ii = 0; ii < 20; ++ii)
            {
                rb.Add(ii);
            }

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

            rb.RemoveRange(12, 4);
            Assert.AreEqual(16, rb.Count);
#if DEBUG
            rb.SanityCheck();
#endif
        }
Beispiel #3
0
        public void CrashRb_RemoveRangeB_ArgumentOutOfRange()
        {
            var rb = new RankedBag <int>();

            rb.RemoveRange(0, -1);
        }