| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 (function() { | 5 (function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 let dart_sdk = dart_library.import('dart_sdk'); | 8 let dart_sdk = dart_library.import('dart_sdk'); |
| 9 dart_sdk._isolate_helper.startRootIsolate(function() {}, []); | 9 dart_sdk._isolate_helper.startRootIsolate(function() {}, []); |
| 10 let async_helper = dart_library.import('async_helper').async_helper; | 10 let async_helper = dart_library.import('async_helper').async_helper; |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 return e; | 745 return e; |
| 746 } | 746 } |
| 747 } | 747 } |
| 748 | 748 |
| 749 test(name, function(done) { // 'function' to allow `this.timeout`. | 749 test(name, function(done) { // 'function' to allow `this.timeout`. |
| 750 async_helper.asyncTestInitialize(done); | 750 async_helper.asyncTestInitialize(done); |
| 751 console.debug('Running test: ' + name); | 751 console.debug('Running test: ' + name); |
| 752 | 752 |
| 753 let mainLibrary = dart_library.import(module)[name]; | 753 let mainLibrary = dart_library.import(module)[name]; |
| 754 let negative = /negative_test/.test(name); | 754 let negative = /negative_test/.test(name); |
| 755 if (has('slow')) this.timeout(5000); | 755 if (has('slow')) this.timeout(10000); |
| 756 if (has('fail')) { | 756 if (has('fail')) { |
| 757 let e = protect(mainLibrary.main); | 757 let e = protect(mainLibrary.main); |
| 758 if (negative) { | 758 if (negative) { |
| 759 if (e != null) { | 759 if (e != null) { |
| 760 throw new Error( | 760 throw new Error( |
| 761 "negative test marked as 'fail' " + | 761 "negative test marked as 'fail' " + |
| 762 "but passed by throwing:\n" + e); | 762 "but passed by throwing:\n" + e); |
| 763 } | 763 } |
| 764 } else { | 764 } else { |
| 765 if (e == null) { | 765 if (e == null) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 | 819 |
| 820 for (let action of unittest_tests) { | 820 for (let action of unittest_tests) { |
| 821 try { | 821 try { |
| 822 action(); | 822 action(); |
| 823 } catch (e) { | 823 } catch (e) { |
| 824 console.error("Caught error tying to setup test:", e); | 824 console.error("Caught error tying to setup test:", e); |
| 825 } | 825 } |
| 826 } | 826 } |
| 827 }); | 827 }); |
| 828 })(); | 828 })(); |
| OLD | NEW |