예제 #1
0
        //			"Bit count mismatch: both masks must contain same number of bits.")]
        public void ContainsAll_WithDiffSizeBits()
        {
            var fmask1 = new FeatureMask(100);
            var fmask2 = new FeatureMask(200);

            Assert.IsNotNull(fmask1.ContainsAll(fmask2));
        }
예제 #2
0
        public void ContainsAll()
        {
            var fmask1 = new FeatureMask(100);
            var fmask2 = new FeatureMask(100);

            fmask1[45] = true;
            fmask1[50] = true;
            fmask1[75] = true;
            Assert.IsFalse(fmask1.ContainsAll(fmask2));

            fmask2[45] = true;
            Assert.IsTrue(fmask1.ContainsAll(fmask2));

            fmask2[50] = true;
            Assert.IsTrue(fmask1.ContainsAll(fmask2));

            fmask2[75] = true;
            Assert.IsTrue(fmask1.ContainsAll(fmask2));

            fmask2[90] = true;
            Assert.IsFalse(fmask1.ContainsAll(fmask2));
        }