diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2014-10-07 17:44:33 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2014-10-07 17:44:48 -0700 |
commit | 0971bb0d57aa6f2db1abee4008b365d52b402891 (patch) | |
tree | c7408b9bd878da51d232da03f9d5c1b2e5be32b9 /python/google/protobuf/internal/text_format_test.py | |
parent | c1d16457dbf5f1b0770db406b75b4b2063556cc3 (diff) | |
download | protobuf-0971bb0d57aa6f2db1abee4008b365d52b402891.tar.gz protobuf-0971bb0d57aa6f2db1abee4008b365d52b402891.tar.bz2 protobuf-0971bb0d57aa6f2db1abee4008b365d52b402891.zip |
Down-integrate from internal branch.
Diffstat (limited to 'python/google/protobuf/internal/text_format_test.py')
-rwxr-xr-x | python/google/protobuf/internal/text_format_test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/google/protobuf/internal/text_format_test.py b/python/google/protobuf/internal/text_format_test.py index b30ea19f..b0a3a5f7 100755 --- a/python/google/protobuf/internal/text_format_test.py +++ b/python/google/protobuf/internal/text_format_test.py @@ -587,6 +587,13 @@ class TextFormatTest(basetest.TestCase): test_util.SetAllFields(message) self.assertEqual(message, parsed_message) + def testParseOneof(self): + m = unittest_pb2.TestAllTypes() + m.oneof_uint32 = 11 + m2 = unittest_pb2.TestAllTypes() + text_format.Parse(text_format.MessageToString(m), m2) + self.assertEqual('oneof_uint32', m2.WhichOneof('oneof_field')) + class TokenizerTest(basetest.TestCase): |