public void Test7() { var flag = new FieldFlag(98); flag.Mark(1); flag.Mark(23); flag.Mark(30); flag.Mark(32); flag.Mark(32); flag.Mark(33); flag.Mark(63); flag.Mark(65); flag.Mark(95); flag.Mark(97); Assert.IsFalse(flag.HasMarked(0)); Assert.IsTrue(flag.HasMarked(1)); Assert.IsFalse(flag.HasMarked(2)); Assert.IsFalse(flag.HasMarked(3)); Assert.IsFalse(flag.HasMarked(22)); Assert.IsTrue(flag.HasMarked(23)); Assert.IsFalse(flag.HasMarked(24)); Assert.IsTrue(flag.HasMarked(30)); Assert.IsTrue(flag.HasMarked(32)); Assert.IsTrue(flag.HasMarked(33)); Assert.IsTrue(flag.HasMarked(63)); Assert.IsFalse(flag.HasMarked(64)); Assert.IsTrue(flag.HasMarked(65)); Assert.IsTrue(flag.HasMarked(95)); Assert.IsFalse(flag.HasMarked(96)); Assert.IsTrue(flag.HasMarked(97)); }
public void Test1() { var flag = new FieldFlag(26); flag.Mark(1); flag.Mark(23); Assert.IsFalse(flag.HasMarked(0)); Assert.IsTrue(flag.HasMarked(1)); Assert.IsFalse(flag.HasMarked(2)); Assert.IsFalse(flag.HasMarked(3)); Assert.IsFalse(flag.HasMarked(22)); Assert.IsTrue(flag.HasMarked(23)); }