Public Member Functions | |
void | testEncodeZigZag () throws Exception |
void | testWriteLittleEndian () throws Exception |
void | testWriteMessageWithNegativeEnumValue () throws Exception |
void | testWriteVarint () throws Exception |
void | testWriteWholeMessage () throws Exception |
void | testWriteWholePackedFieldsMessage () throws Exception |
Private Member Functions | |
void | assertEqualBytes (byte[] a, byte[] b) |
void | assertWriteLittleEndian32 (byte[] data, int value) throws Exception |
void | assertWriteLittleEndian64 (byte[] data, long value) throws Exception |
void | assertWriteVarint (byte[] data, long value) throws Exception |
byte[] | bytes (int... bytesAsInts) |
List< Byte > | toList (byte[] bytes) |
Unit test for CodedOutputStream.
Definition at line 50 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inlineprivate |
|
inlineprivate |
Parses the given bytes using writeRawLittleEndian32() and checks that the result matches the given value.
Definition at line 164 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inlineprivate |
Parses the given bytes using writeRawLittleEndian64() and checks that the result matches the given value.
Definition at line 186 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inlineprivate |
Writes the given value using writeRawVarint32() and writeRawVarint64() and checks that the result matches the given bytes.
Definition at line 81 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inlineprivate |
Helper to construct a byte array from a bunch of bytes. The inputs are actually ints so that I can use hex notation and not get stupid errors about precision.
Definition at line 56 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inline |
Test encodeZigZag32() and encodeZigZag64().
Definition at line 218 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inline |
Tests writeRawLittleEndian32() and writeRawLittleEndian64().
Definition at line 205 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inline |
Test writing a message containing a negative enum value. This used to fail because the size was not properly computed as a sign-extended varint.
Definition at line 310 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inline |
Tests writeRawVarint32() and writeRawVarint64().
Definition at line 131 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inline |
Tests writing a whole message with every field type.
Definition at line 280 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inline |
Tests writing a whole message with every packed field type. Ensures the wire format of packed fields is compatible with C++.
Definition at line 299 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.
|
inlineprivate |
Arrays.asList() does not work with arrays of primitives. :(
Definition at line 65 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/CodedOutputStreamTest.java.