diff options
author | Jisi Liu <jisi.liu@gmail.com> | 2015-02-19 17:27:59 -0800 |
---|---|---|
committer | Jisi Liu <jisi.liu@gmail.com> | 2015-02-19 17:27:59 -0800 |
commit | 0a7fc8f88805198cde6643b5429d16f8402031e0 (patch) | |
tree | 018e0f0715dd98468ca840b7987e7ce446cccf9b /javanano/src/test/java | |
parent | a6fc5da0fc3285399da7974671a96a5fcbcd83f9 (diff) | |
download | protobuf-0a7fc8f88805198cde6643b5429d16f8402031e0.tar.gz protobuf-0a7fc8f88805198cde6643b5429d16f8402031e0.tar.bz2 protobuf-0a7fc8f88805198cde6643b5429d16f8402031e0.zip |
Add test for debug string for oneof
Change-Id: I6a51a35c69ac24a60dd96ef69d556b1e68bc37d6
Diffstat (limited to 'javanano/src/test/java')
-rw-r--r-- | javanano/src/test/java/com/google/protobuf/nano/NanoTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/javanano/src/test/java/com/google/protobuf/nano/NanoTest.java b/javanano/src/test/java/com/google/protobuf/nano/NanoTest.java index 2c9e2d84..4cc77226 100644 --- a/javanano/src/test/java/com/google/protobuf/nano/NanoTest.java +++ b/javanano/src/test/java/com/google/protobuf/nano/NanoTest.java @@ -2670,6 +2670,7 @@ public class NanoTest extends TestCase { msg.repeatedNestedEnum[0] = TestAllTypesNano.BAR; msg.repeatedNestedEnum[1] = TestAllTypesNano.FOO; msg.repeatedStringPiece = new String[] {null, "world"}; + msg.setOneofString("hello"); String protoPrint = msg.toString(); assertTrue(protoPrint.contains("optional_int32: 14")); @@ -2693,6 +2694,7 @@ public class NanoTest extends TestCase { assertTrue(protoPrint.contains("default_string: \"hello\"")); assertFalse(protoPrint.contains("repeated_string_piece: \"\"")); // null should be dropped assertTrue(protoPrint.contains("repeated_string_piece: \"world\"")); + assertTrue(protoPrint.contains("oneof_string: \"hello\"")); } public void testMessageNanoPrinterAccessors() throws Exception { |