예제 #1
0
    public void AppendBitWorks()
    {
      var bits = new BitSequence();

      bits.AppendBit(true);
      Assert.IsTrue(bits.Pop());

      bits.AppendBit(false);
      Assert.IsFalse(bits.Pop());
    }
예제 #2
0
    public void AppendOffBitWorks()
    {
      var bits = new BitSequence();

      bits.AppendBit(false);
      bits.AppendOffBit();
      CollectionAssert.AreEqual(new[] { false, false }, bits.ToBitArray());
    }
예제 #3
0
    public void AppendOnBitWorks()
    {
      var bits = new BitSequence();

      bits.AppendBit(true);
      bits.AppendOnBit();
      CollectionAssert.AreEqual(new[] { true, true }, bits.ToBitArray());
    }