using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using skyscraper5.Skyscraper.IO; namespace skyscraper8.Tests { public class SanityTests { [Fact] public void Test15bits() { byte[] bcd = new byte[] { 0xa9, 0x23 }; MemoryStream ms = new MemoryStream(bcd); byte readUInt8 = ms.ReadUInt8(); bool msbSet = (readUInt8 & 0x80) != 0; Assert.True(msbSet); int result = ms.ReadUInt8(); result <<= 8; result += readUInt8; Assert.Equal(9001, result); } } }