public void TestDisplayUShort() { Assert.AreEqual("00000000 11111111", BitDisplay.UShortToString(255)); Assert.AreEqual("00000000 00000001", BitDisplay.UShortToString(1)); Assert.AreEqual("00000000 00000010", BitDisplay.UShortToString(1 << 1)); Assert.AreEqual("10000000 00000000", BitDisplay.UShortToString(1 << 15)); Assert.AreEqual("10000000 00000001", BitDisplay.UShortToString(1 | 1 << 15)); }
public static void AssertPattern(string pattern, ushort value) { Assert.AreEqual(pattern, BitDisplay.UShortToString(value)); }