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

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

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

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

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