| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 var EXPECTED_OUTPUT = 'sum:8930\n'; | 1 var EXPECTED_OUTPUT = 'sum:8930\n'; |
| 6 var Module = { | 2 var Module = { |
| 7 arguments: [1], | 3 arguments: [1], |
| 8 print: function(x) {Module.printBuffer += x + '\n';}, | 4 print: function(x) {Module.printBuffer += x + '\n';}, |
| 9 preRun: [function() {Module.printBuffer = ''}], | 5 preRun: [function() {Module.printBuffer = ''}], |
| 10 postRun: [function() { | 6 postRun: [function() { |
| 11 assertEquals(EXPECTED_OUTPUT, Module.printBuffer); | 7 assertEquals(EXPECTED_OUTPUT, Module.printBuffer); |
| 12 }], | 8 }], |
| 13 }; | 9 }; |
| 14 // The Module object: Our interface to the outside world. We import | 10 // The Module object: Our interface to the outside world. We import |
| (...skipping 5956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5971 } | 5967 } |
| 5972 | 5968 |
| 5973 // shouldRunNow refers to calling main(), not run(). | 5969 // shouldRunNow refers to calling main(), not run(). |
| 5974 var shouldRunNow = true; | 5970 var shouldRunNow = true; |
| 5975 if (Module['noInitialRun']) { | 5971 if (Module['noInitialRun']) { |
| 5976 shouldRunNow = false; | 5972 shouldRunNow = false; |
| 5977 } | 5973 } |
| 5978 | 5974 |
| 5979 | 5975 |
| 5980 run([].concat(Module["arguments"])); | 5976 run([].concat(Module["arguments"])); |
| OLD | NEW |