Classes | |
class | HackMessage |
class | MockBuilderParent |
class | ReflectionTester |
Private Member Functions | |
TestUtil () | |
Static Private Member Functions | |
static void | assertEqualsExactType (boolean a, boolean b) |
static void | assertEqualsExactType (ByteString a, ByteString b) |
static void | assertEqualsExactType (double a, double b) |
static void | assertEqualsExactType (float a, float b) |
static void | assertEqualsExactType (ForeignEnum a, ForeignEnum b) |
static void | assertEqualsExactType (ImportEnum a, ImportEnum b) |
static void | assertEqualsExactType (int a, int b) |
static void | assertEqualsExactType (long a, long b) |
static void | assertEqualsExactType (String a, String b) |
static void | assertEqualsExactType (TestAllTypes.NestedEnum a, TestAllTypes.NestedEnum b) |
static File | getTestDataDir () |
Static Private Attributes | |
static ByteString | goldenMessage = null |
static ByteString | goldenPackedFieldsMessage = null |
Contains methods for setting all fields of
to some values as well as checking that all the fields are set to those values. These are useful for testing various protocol message features, e.g. set all fields of a message, serialize it, parse it, and check that all fields are set.
This code is not to be used outside of
and subpackages.
Definition at line 162 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlineprivate |
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
.
Definition at line 1276 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
.
Definition at line 408 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are cleared, and that getting the fields returns their default values.
Definition at line 615 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestatic |
Assert (using
} that all extensions of
are cleared, and that getting the extensions returns their default values.
Definition at line 1497 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
.
Definition at line 938 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
followed by
.
Definition at line 1683 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
followed by
.
Definition at line 770 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
.
Definition at line 987 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Get a
with all fields set as they would be by setAllExtensions(TestAllExtensions.Builder).
Definition at line 198 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Get a
with all fields set as they would be by setAllFields(TestAllTypes.Builder).
Definition at line 178 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Get a
with all fields set as they would be by setAllFields(TestAllTypes.Builder).
Definition at line 188 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Get an unmodifiable ExtensionRegistry containing all the extensions of
.
Definition at line 1073 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Get the bytes of the "golden message". This is a serialized TestAllTypes with all fields set as they would be by setAllFields(TestAllTypes.Builder), but it is loaded from a file on disk rather than generated dynamically. The file is actually generated by C++ code, so testing against it verifies compatibility with C++.
Definition at line 3020 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Get the bytes of the "golden packed fields message". This is a serialized TestPackedTypes with all fields set as they would be by setPackedFields(TestPackedTypes.Builder), but it is loaded from a file on disk rather than generated dynamically. The file is actually generated by C++ code, so testing against it verifies compatibility with C++.
Definition at line 3036 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
|
inlinestatic |
|
inlinestaticprivate |
|
inlinestatic |
|
inlinestatic |
Modify the repeated extensions of
to contain the values expected by
.
Definition at line 1233 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Modify the repeated fields of
to contain the values expected by
.
Definition at line 366 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
filename | The path relative to getTestDataDir. |
Definition at line 2998 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
filePath | The path relative to getTestDataDir. |
Definition at line 2968 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Register all of
's extensions with the given ExtensionRegistry.
Definition at line 1084 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Set every field of
to the values expected by
.
Definition at line 1093 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Set every field of
to the values expected by
.
Definition at line 226 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
|
inlinestatic |
Set every field of
to a unique value.
Definition at line 866 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Set every field of
to a unique value. Must correspond with the values applied by
.
Definition at line 902 of file bloaty/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
staticprivate |
|
staticprivate |