diff options
author | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2010-01-21 22:10:55 +0000 |
---|---|---|
committer | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2010-01-21 22:10:55 +0000 |
commit | 28c2ec0dbdd6f1b0ea844f1ccce6c8f05ae917e8 (patch) | |
tree | c4ff9f2230ba3852b3d4967dd15c477112d8adde /java/src/test/java/com/google/protobuf/TextFormatTest.java | |
parent | 48443683465c7fc85eb6d2d8174c0f481fcf90c9 (diff) | |
download | protobuf-28c2ec0dbdd6f1b0ea844f1ccce6c8f05ae917e8.tar.gz protobuf-28c2ec0dbdd6f1b0ea844f1ccce6c8f05ae917e8.tar.bz2 protobuf-28c2ec0dbdd6f1b0ea844f1ccce6c8f05ae917e8.zip |
Fix some Java warnings. Patch from Evan Jones.
Diffstat (limited to 'java/src/test/java/com/google/protobuf/TextFormatTest.java')
-rw-r--r-- | java/src/test/java/com/google/protobuf/TextFormatTest.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/test/java/com/google/protobuf/TextFormatTest.java b/java/src/test/java/com/google/protobuf/TextFormatTest.java index 60bd800e..ad48157a 100644 --- a/java/src/test/java/com/google/protobuf/TextFormatTest.java +++ b/java/src/test/java/com/google/protobuf/TextFormatTest.java @@ -60,8 +60,8 @@ public class TextFormatTest extends TestCase { // A representation of the above string with all the characters escaped. private final static String kEscapeTestStringEscaped = - "\"\\\"A string with \\' characters \\n and \\r newlines " - + "and \\t tabs and \\001 slashes \\\\\""; + "\\\"A string with \\' characters \\n and \\r newlines " + + "and \\t tabs and \\001 slashes \\\\"; private static String allFieldsSetText = TestUtil.readTextFromFile( "text_format_unittest_data.txt"); @@ -469,6 +469,10 @@ public class TextFormatTest extends TestCase { TextFormat.unescapeBytes("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"")); assertEquals("\0\001\007\b\f\n\r\t\013\\\'\"", TextFormat.unescapeText("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"")); + assertEquals(kEscapeTestStringEscaped, + TextFormat.escapeText(kEscapeTestString)); + assertEquals(kEscapeTestString, + TextFormat.unescapeText(kEscapeTestStringEscaped)); // Unicode handling. assertEquals("\\341\\210\\264", TextFormat.escapeText("\u1234")); |