aboutsummaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/message_test.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/message_test.js b/js/message_test.js
index c029a04d..082da944 100644
--- a/js/message_test.js
+++ b/js/message_test.js
@@ -1050,6 +1050,13 @@ describe('Message test suite', function() {
nested.setCount(5);
msg.setDeeplyNestedMessage(nested);
assertEquals(5, msg.getDeeplyNestedMessage().getCount());
+
+ // After a serialization-deserialization round trip we should get back the
+ // same data we started with.
+ var serialized = msg.serializeBinary();
+ var deserialized =
+ proto.jspb.test.ForeignNestedFieldMessage.deserializeBinary(serialized);
+ assertEquals(5, deserialized.getDeeplyNestedMessage().getCount());
});
});