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 compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlineprivate |
Definition at line 163 of file 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
.
Definition at line 1276 of file 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 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 compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1050 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1056 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1047 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1044 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1063 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1066 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1038 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1041 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1053 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1059 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are cleared, and that getting the extensions returns their default values.
Definition at line 1497 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Definition at line 1814 of file 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 938 of file 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 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 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 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 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 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 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 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 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 compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Definition at line 216 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Definition at line 204 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestaticprivate |
Definition at line 2972 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Definition at line 210 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Modify the repeated extensions of
to contain the values expected by
.
Definition at line 1233 of file 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 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 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 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 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 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 compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Definition at line 1782 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
inlinestatic |
Set every field of
to a unique value.
Definition at line 866 of file 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 compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
staticprivate |
Definition at line 3026 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.
|
staticprivate |
Definition at line 3043 of file compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/TestUtil.java.