diff options
Diffstat (limited to 'src/google/protobuf/test_util.h')
-rw-r--r-- | src/google/protobuf/test_util.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/google/protobuf/test_util.h b/src/google/protobuf/test_util.h index 1bedb788..e581f419 100644 --- a/src/google/protobuf/test_util.h +++ b/src/google/protobuf/test_util.h @@ -96,6 +96,17 @@ class TestUtil { // SetAllFieldsAndExtensions(). static void ExpectAllFieldsAndExtensionsInOrder(const string& serialized); + // Check that all repeated fields have had their last elements removed. + static void ExpectLastRepeatedsRemoved( + const unittest::TestAllTypes& message); + static void ExpectLastRepeatedExtensionsRemoved( + const unittest::TestAllExtensions& message); + + // Check that all repeated fields have had their first and last elements swapped. + static void ExpectRepeatedsSwapped(const unittest::TestAllTypes& message); + static void ExpectRepeatedExtensionsSwapped( + const unittest::TestAllExtensions& message); + // Like above, but use the reflection interface. class ReflectionTester { public: @@ -116,6 +127,9 @@ class TestUtil { void ExpectPackedFieldsSetViaReflection(const Message& message); void ExpectPackedClearViaReflection(const Message& message); + void RemoveLastRepeatedsViaReflection(Message* message); + void SwapRepeatedsViaReflection(Message* message); + private: const FieldDescriptor* F(const string& name); |