예제 #1
0
        public void AnyTest()
        {
            var bitSet = new BitSet32(0);

            Assert.That(bitSet.Any(), Is.False);
            bitSet[0] = true;
            Assert.That(bitSet.Any(), Is.True);
        }
예제 #2
0
        public void AllTest()
        {
            var bitSet = new BitSet32(uint.MaxValue);

            Assert.That(bitSet.All(), Is.True);
            bitSet[0] = false;
            Assert.That(bitSet.All(), Is.False);
        }
예제 #3
0
        public void EqualsTest()
        {
            var bitSet1 = new BitSet32(0);
            var bitSet2 = new BitSet32(1);

            Assert.That(bitSet1.Equals(bitSet2), Is.False);
            Assert.That(bitSet1 != bitSet2);
            bitSet1[0] = true;
            Assert.That(bitSet1[0].Equals(bitSet2[0]));
            Assert.That(bitSet1 == bitSet2);
            Assert.That(bitSet1.Equals((object)bitSet2));
            Assert.That(bitSet1.GetHashCode(), Is.EqualTo(bitSet2.GetHashCode()));
        }
예제 #4
0
 public void Clear()
 {
     Strips     = BitSet32.Empty;
     StripCount = 0;
 }