示例#1
0
        public void IterationDeleteTest(int from, int to)
        {
            var intSet = new Kibnet.IntSet();

            for (int i = from; i < to; i++)
            {
                intSet.Add(i);
            }

            for (int i = from; i < to; i++)
            {
                Assert.True(intSet.Contains(i));
                intSet.Remove(i);
                for (int j = from; j < to; j++)
                {
                    if (i >= j)
                    {
                        Assert.False(intSet.Contains(j));
                    }
                    else
                    {
                        Assert.True(intSet.Contains(j));
                    }
                }
            }
        }
示例#2
0
        public void SimpleDeleteTest()
        {
            var intSet = new Kibnet.IntSet();

            for (int i = 100000; i < 200000; i++)
            {
                intSet.Add(i);
                Assert.True(intSet.Contains(i));
                intSet.Remove(i);
                Assert.False(intSet.Contains(i));
            }
        }