| 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 define(['dart_sdk', 'async_helper', 'expect', 'unittest', 'is', 'require'], | 5 define(['dart_sdk', 'async_helper', 'expect', 'unittest', 'is', 'require'], |
| 6 function(dart_sdk, async_helper, expect, unittest, is, require) { | 6 function(dart_sdk, async_helper, expect, unittest, is, require) { |
| 7 'use strict'; | 7 'use strict'; |
| 8 | 8 |
| 9 async_helper = async_helper.async_helper; | 9 async_helper = async_helper.async_helper; |
| 10 let minitest = expect.minitest; | 10 let minitest = expect.minitest; |
| 11 let mochaOnError = window.onerror; | 11 let mochaOnError = window.onerror; |
| 12 dart_sdk.dart.trapRuntimeErrors(false); | 12 dart_sdk.dart.trapRuntimeErrors(false); |
| 13 dart_sdk._isolate_helper.startRootIsolate(function() {}, []); | 13 dart_sdk._isolate_helper.startRootIsolate(function() {}, []); |
| 14 // Make it easier to debug test failures and required for formatter test that |
| 15 // assumes custom formatters are enabled. |
| 16 dart_sdk._debugger.registerDevtoolsFormatter(); |
| 17 |
| 14 let html_config = unittest.html_config; | 18 let html_config = unittest.html_config; |
| 15 // Test attributes are a list of strings, or a string for a single | 19 // Test attributes are a list of strings, or a string for a single |
| 16 // attribute. Valid attributes are: | 20 // attribute. Valid attributes are: |
| 17 // | 21 // |
| 18 // 'pass' - test passes (default) | 22 // 'pass' - test passes (default) |
| 19 // 'skip' - don't run the test | 23 // 'skip' - don't run the test |
| 20 // 'fail' - test fails | 24 // 'fail' - test fails |
| 21 // 'timeout' - test times out | 25 // 'timeout' - test times out |
| 22 // 'slow' - use 5s timeout instead of default 2s. | 26 // 'slow' - use 5s timeout instead of default 2s. |
| 23 // 'helper' - not a test, used by other tests. | 27 // 'helper' - not a test, used by other tests. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 'function_subtype_typearg4_test': fail, | 181 'function_subtype_typearg4_test': fail, |
| 178 'function_type_alias2_test': fail, | 182 'function_type_alias2_test': fail, |
| 179 'function_type_alias3_test': fail, | 183 'function_type_alias3_test': fail, |
| 180 'function_type_alias4_test': fail, | 184 'function_type_alias4_test': fail, |
| 181 'function_type_alias6_test_none_multi': fail, | 185 'function_type_alias6_test_none_multi': fail, |
| 182 'generic_instanceof_test': fail, // runtime strong mode reject | 186 'generic_instanceof_test': fail, // runtime strong mode reject |
| 183 'generic_instanceof2_test': fail, | 187 'generic_instanceof2_test': fail, |
| 184 'generic_is_check_test': fail, | 188 'generic_is_check_test': fail, |
| 185 'getter_closure_execution_order_test': fail, | 189 'getter_closure_execution_order_test': fail, |
| 186 'gc_test': 'slow', | 190 'gc_test': 'slow', |
| 187 'hash_code_mangling_test': fail, | |
| 188 'identical_closure2_test': fail, | 191 'identical_closure2_test': fail, |
| 189 'infinite_switch_label_test': fail, | 192 'infinite_switch_label_test': fail, |
| 190 'infinity_test': fail, | 193 'infinity_test': fail, |
| 191 'initializing_formal_final_test': fail, | 194 'initializing_formal_final_test': fail, |
| 192 'instance_creation_in_function_annotation_test': fail, | 195 'instance_creation_in_function_annotation_test': fail, |
| 193 'instanceof2_test': fail, | 196 'instanceof2_test': fail, |
| 194 'instanceof4_test_01_multi': fail, | 197 'instanceof4_test_01_multi': fail, |
| 195 'instanceof4_test_none_multi': fail, | 198 'instanceof4_test_none_multi': fail, |
| 196 'instanceof_optimized_test': fail, | 199 'instanceof_optimized_test': fail, |
| 197 'integer_division_by_zero_test': fail, | 200 'integer_division_by_zero_test': fail, |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 | 861 |
| 859 for (let action of unittest_tests) { | 862 for (let action of unittest_tests) { |
| 860 try { | 863 try { |
| 861 action(); | 864 action(); |
| 862 } catch (e) { | 865 } catch (e) { |
| 863 console.error("Caught error tying to setup test:", e); | 866 console.error("Caught error tying to setup test:", e); |
| 864 } | 867 } |
| 865 } | 868 } |
| 866 }); | 869 }); |
| 867 }); | 870 }); |
| OLD | NEW |