diff options
author | Adam Cozzette <acozzette@google.com> | 2017-12-01 10:05:10 -0800 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-12-01 10:05:10 -0800 |
commit | 92a7e778e7394386f413cec28d67a07630f784b1 (patch) | |
tree | cb5673c7c09b0d3905b48a24765d07e423bc5b30 /js/debug_test.js | |
parent | ce0a53273a400369932ba788d17500336a6ecaad (diff) | |
download | protobuf-92a7e778e7394386f413cec28d67a07630f784b1.tar.gz protobuf-92a7e778e7394386f413cec28d67a07630f784b1.tar.bz2 protobuf-92a7e778e7394386f413cec28d67a07630f784b1.zip |
Integrated internal changes from Google
Diffstat (limited to 'js/debug_test.js')
-rw-r--r-- | js/debug_test.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/debug_test.js b/js/debug_test.js index 702cc76e..73810871 100644 --- a/js/debug_test.js +++ b/js/debug_test.js @@ -41,6 +41,8 @@ goog.require('proto.jspb.test.IsExtension'); goog.require('proto.jspb.test.Simple1'); +// CommonJS-LoadFromFile: testbinary_pb +goog.require('proto.jspb.test.TestAllTypes'); describe('debugTest', function() { it('testSimple1', function() { @@ -74,6 +76,15 @@ describe('debugTest', function() { }, jspb.debug.dump(message)); }); + it('testBytes', function() { + if (COMPILED || !window['Uint8Array']) { + return; + } + var message = new proto.jspb.test.TestAllTypes(); + var bytes = new Uint8Array(4); + message.setOptionalBytes(bytes); + assertEquals(jspb.debug.dump(message)['optionalBytes'], bytes); + }); it('testExtensions', function() { if (COMPILED) { |