aboutsummaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@google.com>2016-11-21 12:14:42 -0800
committerGravatar Adam Cozzette <acozzette@google.com>2016-11-21 12:14:42 -0800
commitfda876a1492fcd7120c66abac1b47a9361f928df (patch)
tree582e14b224812a8bf645ad750deab0b5a7193c1d /js
parent40f3586412c2efa7a81ccb685e6f96e817996e36 (diff)
Added back in binary serialization round-trip in message_test.js
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());
});
});