public void testEmpty() { var flagSet = new RevFlagSet(); Assert.AreEqual(0, flagSet.Mask); Assert.AreEqual(0, flagSet.Count); Assert.IsNotNull(flagSet.GetEnumerator()); Assert.IsFalse(flagSet.GetEnumerator().MoveNext()); }
public void testEmpty() { var flagSet = new RevFlagSet(); Assert.AreEqual(0, flagSet.Mask); Assert.AreEqual(0, flagSet.Count); Assert.IsNotNull(flagSet.GetEnumerator()); Assert.IsFalse(flagSet.GetEnumerator().MoveNext()); }
public void testAddOne() { const string flagName = "flag"; RevFlag flag = rw.newFlag(flagName); Assert.IsTrue(0 != flag.Mask); Assert.AreSame(flagName, flag.Name); var flagSet = new RevFlagSet(); Assert.IsTrue(flagSet.Add(flag)); Assert.IsFalse(flagSet.Add(flag)); Assert.AreEqual(flag.Mask, flagSet.Mask); Assert.AreEqual(1, flagSet.Count); var i = flagSet.GetEnumerator(); Assert.IsTrue(i.MoveNext()); Assert.AreSame(flag, i.Current); Assert.IsFalse(i.MoveNext()); }
public void testAddOne() { const string flagName = "flag"; RevFlag flag = rw.newFlag(flagName); Assert.IsTrue(0 != flag.Mask); Assert.AreSame(flagName, flag.Name); var flagSet = new RevFlagSet(); Assert.IsTrue(flagSet.Add(flag)); Assert.IsFalse(flagSet.Add(flag)); Assert.AreEqual(flag.Mask, flagSet.Mask); Assert.AreEqual(1, flagSet.Count); var i = flagSet.GetEnumerator(); Assert.IsTrue(i.MoveNext()); Assert.AreSame(flag, i.Current); Assert.IsFalse(i.MoveNext()); }