예제 #1
0
 public void CreateBitMask02_uint16_02StartBitsOn()
 {
     TestHelpers.CatchUnexpected(() => {
         UInt16 mask = 0xFFFF;
         //0, 0, 0, 0, 1, 0, 0, 1
         byte[] bits = new byte[] { 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1 };
         bool result = this.FromVisualArray(bits).CreateBitMask(ref mask);
         Assert.True(result, "Creating bit mask");
         Assert.AreEqual("1000 0111 0000 1001", mask.ToBitString());
         Assert.AreEqual(34569, mask);
         //ByteHelpers
     });
 }