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 () | |
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 (ForeignEnumLite a, ForeignEnumLite b) |
static void | assertEqualsExactType (ImportEnum a, ImportEnum b) |
static void | assertEqualsExactType (ImportEnumLite a, ImportEnumLite 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 void | assertEqualsExactType (TestAllTypesLite.NestedEnum a, TestAllTypesLite.NestedEnum b) |
static File | getTestDataDir () |
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 core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlineprivate |
Definition at line 255 of file 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 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 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 core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2560 of file 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 core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1143 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1151 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1139 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1135 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1159 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1172 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1163 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1176 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1127 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1131 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1147 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1155 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 1167 of file 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 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 core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2546 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 1945 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2490 of file 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 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 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 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 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 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 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 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 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 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 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 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 core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 316 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 304 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 3764 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 310 of file 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 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 core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
filename | The path relative to getTestDataDir. |
Definition at line 3788 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestaticprivate |
Definition at line 3803 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
filePath | The path relative to getTestDataDir. |
Definition at line 3760 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Register all of
's extensions with the given {}.
Definition at line 1206 of file 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 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 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 core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 2539 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Definition at line 1913 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
inlinestatic |
Set every field of
to a unique value.
Definition at line 955 of file 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 core/src/test/java/com/google/protobuf/TestUtil.java.
|
staticprivate |
Definition at line 3826 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
staticprivate |
Definition at line 3842 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
static |
Definition at line 259 of file core/src/test/java/com/google/protobuf/TestUtil.java.
|
static |
Definition at line 257 of file core/src/test/java/com/google/protobuf/TestUtil.java.