public void ShouldSetBit(int index, byte[] leftBits, byte[] expectedResult) { dba.SetLeftBits(leftBits, 0, 0, leftBits.Length * 8); dba.SetBit(index); var actualResult = dba.ToByteArray(); Assert.That(actualResult, Is.EqualTo(expectedResult)); }
/// <summary> /// Sets the value of the bit identified with the given index within the bit array that underlies both the /// left and right bit arrays. /// </summary> /// <param name="index">The 0-based index of the bit within the bit array.</param> public void SetBit(int index) { duoBitArray.SetBit(index); mask.SetBit(index); }