public void testClone()
 {
     BitSet bitSet = new BitSet(NUM_BITS);
     bitSet.Set(NUM_BITS-1);
     bitSet = (BitSet)bitSet.Clone();
     Assert.True(bitSet.Get(NUM_BITS-1));
 }
        public void testGetSet()
        {
            BitSet bitSet = new BitSet(NUM_BITS);
            for (int i = 0; i < NUM_BITS; i++) {
              Assert.False(bitSet.Get(i));

            }
            bitSet.Set(0);
            bitSet.Set(NUM_BITS-1);
            Assert.True(bitSet.Get(0));
            Assert.True(bitSet.Get(NUM_BITS-1));
        }
示例#3
0
 public void testClear()
 {
     BitSet bitSet = new BitSet(NUM_BITS);
     for (int i = 0; i < NUM_BITS; i++) {
       bitSet.Set(i);
     }
     for (int i = 0; i < NUM_BITS; i++) {
       Assert.True(bitSet.Get(i));
     }
     bitSet.Clear();
     for (int i = 0; i < NUM_BITS; i++) {
       Assert.False(bitSet.Get(i));
     }
 }
示例#4
0
 public void testBounds2()
 {
     BitSet bitSet = new BitSet(NUM_BITS);
     bitSet.Set(-1);
 }
示例#5
0
 public void testBounds1()
 {
     BitSet bitSet = new BitSet(NUM_BITS);
     bitSet.Set(1000);
 }