Example #1
0
        public virtual void testRemove()
        {
            RevFlag flag1   = rw.newFlag("flag_1");
            RevFlag flag2   = rw.newFlag("flag_2");
            var     flagSet = new RevFlagSet();

            Assert.IsTrue(flagSet.Add(flag1));
            Assert.IsTrue(flagSet.Add(flag2));

            Assert.IsTrue(flagSet.Remove(flag1));
            Assert.IsFalse(flagSet.Remove(flag1));
            Assert.AreEqual(flag2.Mask, flagSet.Mask);
            Assert.IsFalse(flagSet.Contains(flag1));
        }
Example #2
0
		public virtual void TestRemove()
		{
			RevFlag flag1 = rw.NewFlag("flag_1");
			RevFlag flag2 = rw.NewFlag("flag_2");
			RevFlagSet set = new RevFlagSet();
			NUnit.Framework.Assert.IsTrue(set.AddItem(flag1));
			NUnit.Framework.Assert.IsTrue(set.AddItem(flag2));
			NUnit.Framework.Assert.IsTrue(set.Remove(flag1));
			NUnit.Framework.Assert.IsFalse(set.Remove(flag1));
			NUnit.Framework.Assert.AreEqual(flag2.mask, set.mask);
			NUnit.Framework.Assert.IsFalse(set.Contains(flag1));
		}
Example #3
0
        public virtual void testRemove()
        {
            RevFlag flag1 = rw.newFlag("flag_1");
            RevFlag flag2 = rw.newFlag("flag_2");
            var flagSet = new RevFlagSet();
            Assert.IsTrue(flagSet.Add(flag1));
            Assert.IsTrue(flagSet.Add(flag2));

            Assert.IsTrue(flagSet.Remove(flag1));
            Assert.IsFalse(flagSet.Remove(flag1));
            Assert.AreEqual(flag2.Mask, flagSet.Mask);
            Assert.IsFalse(flagSet.Contains(flag1));
        }