/// <summary> /// Parses the given bytes using ReadRawLittleEndian32() and checks /// that the result matches the given value. /// </summary> private static void AssertReadLittleEndian32(byte[] data, uint value) { CodedInputStream input = CodedInputStream.CreateInstance(data); Assert.AreEqual(value, input.ReadRawLittleEndian32()); // Try different block sizes. for (int blockSize = 1; blockSize <= 16; blockSize *= 2) { input = CodedInputStream.CreateInstance( new SmallBlockInputStream(data, blockSize)); Assert.AreEqual(value, input.ReadRawLittleEndian32()); } }