| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 message.setABoolean(true); | 58 message.setABoolean(true); |
| 59 message.setARepeatedStringList(['1', '2']); | 59 message.setARepeatedStringList(['1', '2']); |
| 60 | 60 |
| 61 assertObjectEquals({ | 61 assertObjectEquals({ |
| 62 $name: 'proto.jspb.test.Simple1', | 62 $name: 'proto.jspb.test.Simple1', |
| 63 'aString': 'foo', | 63 'aString': 'foo', |
| 64 'aRepeatedStringList': ['1', '2'], | 64 'aRepeatedStringList': ['1', '2'], |
| 65 'aBoolean': true | 65 'aBoolean': true |
| 66 }, jspb.debug.dump(message)); | 66 }, jspb.debug.dump(message)); |
| 67 | 67 |
| 68 message.setAString(undefined); | 68 message.clearAString(); |
| 69 | 69 |
| 70 assertObjectEquals({ | 70 assertObjectEquals({ |
| 71 $name: 'proto.jspb.test.Simple1', | 71 $name: 'proto.jspb.test.Simple1', |
| 72 'aRepeatedStringList': ['1', '2'], | 72 'aRepeatedStringList': ['1', '2'], |
| 73 'aBoolean': true | 73 'aBoolean': true |
| 74 }, jspb.debug.dump(message)); | 74 }, jspb.debug.dump(message)); |
| 75 }); | 75 }); |
| 76 | 76 |
| 77 | 77 |
| 78 it('testExtensions', function() { | 78 it('testExtensions', function() { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 96 'extField': { | 96 'extField': { |
| 97 '$name': 'proto.jspb.test.IsExtension', | 97 '$name': 'proto.jspb.test.IsExtension', |
| 98 'ext1': 'ext1field' | 98 'ext1': 'ext1field' |
| 99 }, | 99 }, |
| 100 'repeatedSimpleList': [] | 100 'repeatedSimpleList': [] |
| 101 } | 101 } |
| 102 }, jspb.debug.dump(extendable)); | 102 }, jspb.debug.dump(extendable)); |
| 103 }); | 103 }); |
| 104 | 104 |
| 105 }); | 105 }); |
| OLD | NEW |