aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/test/java/com/google/protobuf/NanoTest.java
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2014-03-21 18:05:10 -0700
committerWink Saville <wink@google.com>2014-03-21 18:05:10 -0700
commit2d849337400b64ee913ece4631d3b2dbc95f20d8 (patch)
tree629735fb54faae65062c4738769930b2685f8f09 /java/src/test/java/com/google/protobuf/NanoTest.java
parentec0b12c34a6329d2f98003e9102fe2d75726c797 (diff)
downloadexternal_protobuf-2d849337400b64ee913ece4631d3b2dbc95f20d8.zip
external_protobuf-2d849337400b64ee913ece4631d3b2dbc95f20d8.tar.gz
external_protobuf-2d849337400b64ee913ece4631d3b2dbc95f20d8.tar.bz2
Revert "Don't reset cachedSize to 0 in getSerializedSize"
This reverts commit c6e12c6702ca764486f952654ba1568f00efe813.
Diffstat (limited to 'java/src/test/java/com/google/protobuf/NanoTest.java')
-rw-r--r--java/src/test/java/com/google/protobuf/NanoTest.java15
1 files changed, 0 insertions, 15 deletions
diff --git a/java/src/test/java/com/google/protobuf/NanoTest.java b/java/src/test/java/com/google/protobuf/NanoTest.java
index 4aa6d89..9987cac 100644
--- a/java/src/test/java/com/google/protobuf/NanoTest.java
+++ b/java/src/test/java/com/google/protobuf/NanoTest.java
@@ -105,14 +105,6 @@ public class NanoTest extends TestCase {
assertEquals(456, newMsg.d);
assertEquals(2, msg.nestedMsg.bb);
assertEquals(SimpleMessageNano.BAR, msg.defaultNestedEnum);
-
- msg.nestedMsg = null;
- assertEquals(msgSerializedSize, msg.getCachedSize());
- assertTrue(msgSerializedSize != msg.getSerializedSize());
-
- msg.clear();
- assertEquals(0, msg.getCachedSize());
- assertEquals(0, msg.getSerializedSize());
}
public void testRecursiveMessageNano() throws Exception {
@@ -3540,13 +3532,6 @@ public class NanoTest extends TestCase {
assertTrue(Arrays.equals(new boolean[] {false, true, false, true}, nonPacked.bools));
}
- public void testMessageNoFields() {
- SingleMessageNano msg = new SingleMessageNano();
- assertEquals(0, msg.getSerializedSize());
- assertEquals(0, msg.getCachedSize());
- assertEquals(0, MessageNano.toByteArray(msg).length);
- }
-
private void assertRepeatedPackablesEqual(
NanoRepeatedPackables.NonPacked nonPacked, NanoRepeatedPackables.Packed packed) {
// Not using MessageNano.equals() -- that belongs to a separate test.