Classes | |
class | MockBuilderParent |
class | ReflectionTester |
class | TestLogHandler |
Static Public Attributes | |
static final TestRequired | TEST_REQUIRED_INITIALIZED |
static final TestRequired | TEST_REQUIRED_UNINITIALIZED |
Private Member Functions | |
TestUtil () | |
TestUtil () | |
Static Private Member Functions | |
static void | assertEqualsExactType (boolean a, boolean b) |
static void | assertEqualsExactType (boolean a, boolean b) |
static void | assertEqualsExactType (ByteString a, ByteString b) |
static void | assertEqualsExactType (ByteString a, ByteString b) |
static void | assertEqualsExactType (double a, double b) |
static void | assertEqualsExactType (double a, double b) |
static void | assertEqualsExactType (float a, float b) |
static void | assertEqualsExactType (float a, float b) |
static void | assertEqualsExactType (ForeignEnum a, ForeignEnum b) |
static void | assertEqualsExactType (ForeignEnum a, ForeignEnum b) |
static void | assertEqualsExactType (ForeignEnumLite a, ForeignEnumLite b) |
static void | assertEqualsExactType (ForeignEnumLite a, ForeignEnumLite b) |
static void | assertEqualsExactType (ImportEnum a, ImportEnum b) |
static void | assertEqualsExactType (ImportEnum a, ImportEnum b) |
static void | assertEqualsExactType (ImportEnumLite a, ImportEnumLite b) |
static void | assertEqualsExactType (ImportEnumLite a, ImportEnumLite b) |
static void | assertEqualsExactType (int a, int b) |
static void | assertEqualsExactType (int a, int b) |
static void | assertEqualsExactType (long a, long b) |
static void | assertEqualsExactType (long a, long b) |
static void | assertEqualsExactType (String a, String b) |
static void | assertEqualsExactType (String a, String b) |
static void | assertEqualsExactType (TestAllTypes.NestedEnum a, TestAllTypes.NestedEnum b) |
static void | assertEqualsExactType (TestAllTypes.NestedEnum a, TestAllTypes.NestedEnum b) |
static void | assertEqualsExactType (TestAllTypesLite.NestedEnum a, TestAllTypesLite.NestedEnum b) |
static void | assertEqualsExactType (TestAllTypesLite.NestedEnum a, TestAllTypesLite.NestedEnum b) |
static File | getTestDataDir () |
static File | getTestDataDir () |
static ByteString | readBytesFromResource (String name) |
static ByteString | readBytesFromResource (String name) |
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 254 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlineprivate |
Definition at line 255 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlineprivate |
Definition at line 255 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
.
Definition at line 1997 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
.
Definition at line 1997 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
.
Definition at line 1406 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
.
Definition at line 1406 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
.
Definition at line 489 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
.
Definition at line 489 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2560 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2560 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are cleared, and that getting the fields returns their default values.
Definition at line 703 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are cleared, and that getting the fields returns their default values.
Definition at line 703 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1143 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1143 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1151 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1151 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1139 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1139 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1135 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1135 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1159 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1159 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1172 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1172 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1163 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1163 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1176 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1176 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
Definition at line 1127 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
Definition at line 1127 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1131 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1131 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1147 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1147 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1155 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1155 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1167 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1167 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are cleared, and that getting the extensions returns their default values.
Definition at line 2223 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are cleared, and that getting the extensions returns their default values.
Definition at line 2223 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are cleared, and that getting the extensions returns their default values.
Definition at line 1627 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are cleared, and that getting the extensions returns their default values.
Definition at line 1627 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2546 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2546 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 1945 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 1945 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2490 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2490 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
.
Definition at line 1027 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
.
Definition at line 1027 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
followed by
.
Definition at line 2390 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
followed by
.
Definition at line 2390 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
followed by
.
Definition at line 1815 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all extensions of
are set to the values assigned by
followed by
.
Definition at line 1815 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
followed by
.
Definition at line 862 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
followed by
.
Definition at line 862 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
.
Definition at line 1076 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Assert (using
} that all fields of
are set to the values assigned by
.
Definition at line 1076 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get a
with all fields set as they would be by {}.
Definition at line 298 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get a
with all fields set as they would be by {}.
Definition at line 298 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get a
with all fields set as they would be by {}.
Definition at line 278 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get a
with all fields set as they would be by {}.
Definition at line 278 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get a
with all fields set as they would be by {}.
Definition at line 288 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get a
with all fields set as they would be by {}.
Definition at line 288 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get an unmodifiable ExtensionRegistry containing all the extensions of
.
Definition at line 1184 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get an unmodifiable ExtensionRegistry containing all the extensions of
.
Definition at line 1184 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get an unmodifiable ExtensionRegistry containing all the extensions of
.
Definition at line 1195 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Get an unmodifiable ExtensionRegistry containing all the extensions of
.
Definition at line 1195 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/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 3818 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/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 3830 of file protobuf/java/core/src/test/java/com/google/protobuf/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 3834 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/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 3846 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 316 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 316 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 304 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 304 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 3764 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 3766 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 310 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 310 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Modify the repeated extensions of
to contain the values expected by
.
Definition at line 1360 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Modify the repeated extensions of
to contain the values expected by
.
Definition at line 1360 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Modify the repeated fields of
to contain the values expected by
.
Definition at line 452 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Modify the repeated fields of
to contain the values expected by
.
Definition at line 452 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
filename | The path relative to getTestDataDir. |
Definition at line 3788 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
filename | The path relative to getTestDataDir. |
Definition at line 3801 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 3803 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 3816 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
filePath | The path relative to getTestDataDir. |
Definition at line 3760 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
filePath | The path relative to getTestDataDir. |
Definition at line 3760 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Register all of
's extensions with the given {}.
Definition at line 1206 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Register all of
's extensions with the given {}.
Definition at line 1206 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Dirties the message by resetting the momoized serialized size.
Definition at line 269 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Dirties the message by resetting the momoized serialized size.
Definition at line 269 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Set every field of
to the values expected by
.
Definition at line 1214 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Set every field of
to the values expected by
.
Definition at line 1214 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Set every field of
to the values expected by
.
Definition at line 323 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Set every field of
to the values expected by
.
Definition at line 323 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2539 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2539 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 1913 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 1913 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Set every field of
to a unique value.
Definition at line 955 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Set every field of
to a unique value.
Definition at line 955 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Set every field of
to a unique value. Must correspond with the values applied by
.
Definition at line 991 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Set every field of
to a unique value. Must correspond with the values applied by
.
Definition at line 991 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Helper to convert a String to ByteString.
Definition at line 263 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
staticprivate |
Definition at line 3826 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
staticprivate |
Definition at line 3842 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
static |
Definition at line 259 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.
|
static |
Definition at line 257 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.