public virtual void TestReadShortPosition() { var read = _input.ReadShort(1); var val = BytesExtensions.ReadShort(InitData, 1, Endianness.BigEndian); Assert.AreEqual(val, read); }
public virtual void TestReadShortEndianness() { var read = _input.ReadShort(Endianness.LittleEndian); var val = BytesExtensions.ReadShort(InitData, 0, Endianness.LittleEndian); Assert.AreEqual(val, read); }
public virtual void TestWriteShortV() { short expected = 100; _output.Write(expected); var actual = BytesExtensions.ReadShort(_output.Buffer, 0, Endianness.BigEndian); Assert.AreEqual(actual, expected); }
public virtual void TestWriteShortForVEndianness() { short expected = 100; _output.Write(2, expected, Endianness.LittleEndian); var actual = BytesExtensions.ReadShort(_output.Buffer, 2, Endianness.LittleEndian); Assert.AreEqual(actual, expected); }