diff options
author | Adam Cozzette <acozzette@google.com> | 2016-11-21 12:14:42 -0800 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2016-11-21 12:14:42 -0800 |
commit | fda876a1492fcd7120c66abac1b47a9361f928df (patch) | |
tree | 582e14b224812a8bf645ad750deab0b5a7193c1d /js | |
parent | 40f3586412c2efa7a81ccb685e6f96e817996e36 (diff) | |
download | protobuf-fda876a1492fcd7120c66abac1b47a9361f928df.tar.gz protobuf-fda876a1492fcd7120c66abac1b47a9361f928df.tar.bz2 protobuf-fda876a1492fcd7120c66abac1b47a9361f928df.zip |
Added back in binary serialization round-trip in message_test.js
Diffstat (limited to 'js')
-rw-r--r-- | js/message_test.js | 7 |
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()); }); }); |