aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/test/java/com/google/protobuf/LiteTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/test/java/com/google/protobuf/LiteTest.java')
-rw-r--r--java/src/test/java/com/google/protobuf/LiteTest.java34
1 files changed, 1 insertions, 33 deletions
diff --git a/java/src/test/java/com/google/protobuf/LiteTest.java b/java/src/test/java/com/google/protobuf/LiteTest.java
index 8bb30ad..728bad9 100644
--- a/java/src/test/java/com/google/protobuf/LiteTest.java
+++ b/java/src/test/java/com/google/protobuf/LiteTest.java
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -37,11 +37,6 @@ import com.google.protobuf.UnittestLite.TestNestedExtensionLite;
import junit.framework.TestCase;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
/**
* Test lite runtime.
*
@@ -118,31 +113,4 @@ public class LiteTest extends TestCase {
assertEquals(7, message2.getExtension(
UnittestLite.optionalNestedMessageExtensionLite).getBb());
}
-
- public void testSerialize() throws Exception {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- TestAllTypesLite expected =
- TestAllTypesLite.newBuilder()
- .setOptionalInt32(123)
- .addRepeatedString("hello")
- .setOptionalNestedMessage(
- TestAllTypesLite.NestedMessage.newBuilder().setBb(7))
- .build();
- ObjectOutputStream out = new ObjectOutputStream(baos);
- try {
- out.writeObject(expected);
- } finally {
- out.close();
- }
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- ObjectInputStream in = new ObjectInputStream(bais);
- TestAllTypesLite actual = (TestAllTypesLite) in.readObject();
- assertEquals(expected.getOptionalInt32(), actual.getOptionalInt32());
- assertEquals(expected.getRepeatedStringCount(),
- actual.getRepeatedStringCount());
- assertEquals(expected.getRepeatedString(0),
- actual.getRepeatedString(0));
- assertEquals(expected.getOptionalNestedMessage().getBb(),
- actual.getOptionalNestedMessage().getBb());
- }
}