public void CompareArrays_DifferentMask_False() { var mask1 = new MaskBits(8, 2); var mask2 = new MaskBits(9, 2); Assert.Equal(false, mask1.Equals(mask2.Mask)); }
public void CompareArrays_SameReferences_True() { var mask1 = new MaskBits(8, 2); var mask2 = mask1.Mask; Assert.Equal(true, mask1.Equals(mask2)); }
public void GetCombinationsMaskBits_8_2() { ulong[] result = { 0x40, 0x80 }; MaskBits mask = new MaskBits(8, 2); Assert.Equal(true, mask.Equals(result)); }
public void Decrement_8_1_Is_7_6() { ulong[] result = { 0x20, 0x40 }; MaskBits mask = new MaskBits(8, 2); Decrement(mask, 7); Assert.Equal(true, mask.Equals(result)); }
// Bit 8 and 7 to one, if decrements bit 8 and 6 to one, bit 7 to 0 public void Decrement_8_7_Is_8_6() { ulong[] result = { 0x20, 0x80 }; MaskBits mask = new MaskBits(8, 2); mask.Decrement(); Assert.Equal(true, mask.Equals(result)); }
public void GetCombinationsMaskBits_8_2_Decrement_1_Reset() { ulong[] result = { 0x40, 0x80 }; MaskBits mask = new MaskBits(8, 2); mask.Decrement(); mask.Reset(); Assert.Equal(true, mask.Equals(result)); }
public void Decrement_2_1_Is_2_1() { ulong[] result = { 0x1, 0x2 }; MaskBits mask = new MaskBits(8, 2); Decrement(mask, 7); Decrement(mask, 6); Decrement(mask, 5); Decrement(mask, 4); Decrement(mask, 3); Decrement(mask, 2); mask.Decrement(); Assert.Equal(true, mask.Equals(result)); Assert.Equal(true, mask.IsParsingComplete); }
public void GetCombinationsMaskBits_52_7() { // 0000 0000 0000//1000 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0100 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0010 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0001 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0000 1000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0000 0100.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0000 0010.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 ulong[] result = { 0x200000000000, 0x400000000000, 0x800000000000, 0x1000000000000, 0x2000000000000, 0x4000000000000, 0x8000000000000 }; MaskBits mask = new MaskBits(52, 7); Assert.Equal(true, mask.Equals(result)); }
public void CompareArrays_Null_False() { var mask1 = new MaskBits(8, 2); Assert.Equal(false, mask1.Equals(null)); }
public void GetCombinationsMaskBits_8_1() { ulong[] result = { 0x80 }; MaskBits mask = new MaskBits(8, 1); Assert.Equal(true, mask.Equals(result)); }
public void GetCombinationsMaskBits_52_7() { // 0000 0000 0000//1000 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0100 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0010 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0001 0000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0000 1000.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0000 0100.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 // 0000 0000 0000//0000 0010.0000 0/000.0000 0000.00/00 0000.0000 000/0.0000 0000.0000 ulong[] result = { 0x200000000000, 0x400000000000, 0x800000000000, 0x1000000000000, 0x2000000000000, 0x4000000000000, 0x8000000000000 }; MaskBits mask = new MaskBits(52, 7); Assert.Equal(true, mask.Equals(result)); }
public void CompareArrays_SameReferences_True() { var mask1 = new MaskBits(8, 2); var mask2 = mask1.Mask; Assert.Equal(true, mask1.Equals(mask2)); }
public void CompareArrays_Null_False() { var mask1 = new MaskBits(8, 2); Assert.Equal(false, mask1.Equals(null)); }
public void CompareArrays_DifferentMask_False() { var mask1 = new MaskBits(8, 2); var mask2 = new MaskBits(9, 2); Assert.Equal(false, mask1.Equals(mask2.Mask)); }
public void GetCombinationsMaskBits_8_2_Decrement_1_Reset() { ulong[] result = { 0x40, 0x80 }; MaskBits mask = new MaskBits(8, 2); mask.Decrement(); mask.Reset(); Assert.Equal(true, mask.Equals(result)); }