diff options
author | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2010-09-17 23:20:04 +0000 |
---|---|---|
committer | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2010-09-17 23:20:04 +0000 |
commit | a4a9ef8c8b9ecf1a1f2dd71a608032db45aad1ea (patch) | |
tree | b8cdbb1c0bee68f909a1c47cdec46f25e584f979 /java/src/test | |
parent | b541e3c9665dd0d73f0a5f8995822a2b611b15a3 (diff) | |
download | protobuf-a4a9ef8c8b9ecf1a1f2dd71a608032db45aad1ea.tar.gz protobuf-a4a9ef8c8b9ecf1a1f2dd71a608032db45aad1ea.tar.bz2 protobuf-a4a9ef8c8b9ecf1a1f2dd71a608032db45aad1ea.zip |
Roll back revision 313. A similar but far more exensive change was made in our internal branch, which will be integrated soon.
Diffstat (limited to 'java/src/test')
-rw-r--r-- | java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java b/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java index 85691d60..48e54657 100644 --- a/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java +++ b/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java @@ -36,7 +36,6 @@ import protobuf_unittest.UnittestProto.TestPackedTypes; import junit.framework.TestCase; import java.io.ByteArrayOutputStream; -import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -212,29 +211,6 @@ public class CodedOutputStreamTest extends TestCase { 0x9abcdef012345678L); } - /** Test writing cached strings. */ - public void testWriteStringCached() throws IOException { - final ByteArrayOutputStream output = new ByteArrayOutputStream(); - final CodedOutputStream stream = CodedOutputStream.newInstance(output); - - // Test writing a string that is not cached - stream.writeStringCached(5, "hello", null); - stream.flush(); - CodedInputStream in = CodedInputStream.newInstance(output.toByteArray()); - assertEquals(WireFormat.makeTag(5, WireFormat.WIRETYPE_LENGTH_DELIMITED), - in.readTag()); - assertEquals("hello", in.readString()); - - // Write a cached string: the real string is ignored - output.reset(); - stream.writeStringCached(5, "ignored", ByteString.copyFromUtf8("hello")); - stream.flush(); - in = CodedInputStream.newInstance(output.toByteArray()); - assertEquals(WireFormat.makeTag(5, WireFormat.WIRETYPE_LENGTH_DELIMITED), - in.readTag()); - assertEquals("hello", in.readString()); - } - /** Test encodeZigZag32() and encodeZigZag64(). */ public void testEncodeZigZag() throws Exception { assertEquals(0, CodedOutputStream.encodeZigZag32( 0)); |