| 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; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 'compile_time_constant_k_test_none_multi': fail, | 110 'compile_time_constant_k_test_none_multi': fail, |
| 111 'compile_time_constant_o_test_none_multi': fail, | 111 'compile_time_constant_o_test_none_multi': fail, |
| 112 'const_evaluation_test_01_multi': fail, | 112 'const_evaluation_test_01_multi': fail, |
| 113 'const_switch_test_02_multi': fail, | 113 'const_switch_test_02_multi': fail, |
| 114 'const_switch_test_04_multi': fail, | 114 'const_switch_test_04_multi': fail, |
| 115 'constructor12_test': fail, | 115 'constructor12_test': fail, |
| 116 'covariant_subtyping_tearoff2_test': fail, | 116 'covariant_subtyping_tearoff2_test': fail, |
| 117 'covariant_subtyping_tearoff3_test': fail, | 117 'covariant_subtyping_tearoff3_test': fail, |
| 118 'covariant_subtyping_unsafe_call2_test': fail, | 118 'covariant_subtyping_unsafe_call2_test': fail, |
| 119 'covariant_subtyping_unsafe_call3_test': fail, | 119 'covariant_subtyping_unsafe_call3_test': fail, |
| 120 'custom_await_stack_trace_test': fail, |
| 120 'cyclic_type2_test': fail, | 121 'cyclic_type2_test': fail, |
| 121 'cyclic_type_test_00_multi': fail, | 122 'cyclic_type_test_00_multi': fail, |
| 122 'cyclic_type_test_01_multi': fail, | 123 'cyclic_type_test_01_multi': fail, |
| 123 'cyclic_type_test_02_multi': fail, | 124 'cyclic_type_test_02_multi': fail, |
| 124 'cyclic_type_test_03_multi': fail, | 125 'cyclic_type_test_03_multi': fail, |
| 125 'cyclic_type_test_04_multi': fail, | 126 'cyclic_type_test_04_multi': fail, |
| 126 | 127 |
| 127 // Deferred libraries are not actually deferred. These tests all test | 128 // Deferred libraries are not actually deferred. These tests all test |
| 128 // that synchronous access to the library fails. | 129 // that synchronous access to the library fails. |
| 129 'deferred_call_empty_before_load_test': fail, | 130 'deferred_call_empty_before_load_test': fail, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 'infinite_switch_label_test': fail, | 201 'infinite_switch_label_test': fail, |
| 201 'infinity_test': fail, | 202 'infinity_test': fail, |
| 202 'initializing_formal_final_test': fail, | 203 'initializing_formal_final_test': fail, |
| 203 'instance_creation_in_function_annotation_test': fail, | 204 'instance_creation_in_function_annotation_test': fail, |
| 204 'instanceof2_test': fail, | 205 'instanceof2_test': fail, |
| 205 'instanceof4_test_01_multi': fail, | 206 'instanceof4_test_01_multi': fail, |
| 206 'instanceof4_test_none_multi': fail, | 207 'instanceof4_test_none_multi': fail, |
| 207 'instanceof_optimized_test': fail, | 208 'instanceof_optimized_test': fail, |
| 208 'integer_division_by_zero_test': fail, | 209 'integer_division_by_zero_test': fail, |
| 209 'issue_22780_test_01_multi': fail, | 210 'issue_22780_test_01_multi': fail, |
| 211 'issue23244_test': fail, |
| 210 'lazy_static3_test': fail, | 212 'lazy_static3_test': fail, |
| 211 'least_upper_bound_expansive_test_none_multi': fail, | 213 'least_upper_bound_expansive_test_none_multi': fail, |
| 212 'left_shift_test': fail, | 214 'left_shift_test': fail, |
| 213 'list_is_test': fail, | 215 'list_is_test': fail, |
| 214 'list_literal3_test': fail, | 216 'list_literal3_test': fail, |
| 215 'many_generic_instanceof_test': fail, | 217 'many_generic_instanceof_test': fail, |
| 216 'many_named_arguments_test': whitelist, | 218 'many_named_arguments_test': whitelist, |
| 217 'map_literal10_test': fail, | 219 'map_literal10_test': fail, |
| 218 'map_literal7_test': fail, | 220 'map_literal7_test': fail, |
| 219 'memory_swap_test': skip_timeout, | 221 'memory_swap_test': skip_timeout, |
| 220 'method_invocation_test': fail, | 222 'method_invocation_test': fail, |
| 221 'mint_arithmetic_test': fail, | 223 'mint_arithmetic_test': fail, |
| 222 'mixin_forwarding_constructor3_test': fail, | 224 'mixin_forwarding_constructor3_test': fail, |
| 223 'mixin_implements_test': fail, | 225 'mixin_implements_test': fail, |
| 224 'mixin_regress_13688_test': fail, | 226 'mixin_regress_13688_test': fail, |
| 225 'modulo_test': fail, | 227 'modulo_test': fail, |
| 226 'named_parameter_clash_test': fail, | 228 'named_parameter_clash_test': fail, |
| 227 'named_parameters_passing_falsy_test': is.firefox('<=50') ? fail : pass, | 229 'named_parameters_passing_falsy_test': is.firefox('<=50') ? fail : pass, |
| 228 'nan_identical_test': fail, | 230 'nan_identical_test': fail, |
| 229 'nested_switch_label_test': fail, | 231 'nested_switch_label_test': fail, |
| 230 'number_identifier_test_05_multi': fail, | 232 'number_identifier_test_05_multi': fail, |
| 231 'number_identity2_test': fail, | 233 'number_identity2_test': fail, |
| 232 'numbers_test': fail, | 234 'numbers_test': fail, |
| 233 'redirecting_factory_reflection_test': fail, | 235 'redirecting_factory_reflection_test': fail, |
| 234 'reg_exp_test': whitelist, | 236 'reg_exp_test': whitelist, |
| 235 'regress_16640_test': fail, | 237 'regress_16640_test': fail, |
| 236 'regress_18535_test': fail, | 238 'regress_18535_test': fail, |
| 239 'regress_22445_test': fail, |
| 237 'regress_22666_test': fail, | 240 'regress_22666_test': fail, |
| 238 'regress_22777_test': flaky, | 241 'regress_22777_test': flaky, |
| 239 'setter_no_getter_test_01_multi': fail, | 242 'setter_no_getter_test_01_multi': fail, |
| 240 'stack_overflow_stacktrace_test': fail, | 243 'stack_overflow_stacktrace_test': fail, |
| 241 'stack_overflow_test': fail, | 244 'stack_overflow_test': fail, |
| 242 'stacktrace_rethrow_error_test_none_multi': fail, | 245 'stacktrace_rethrow_error_test_none_multi': fail, |
| 243 'stacktrace_rethrow_error_test_withtraceparameter_multi': fail, | 246 'stacktrace_rethrow_error_test_withtraceparameter_multi': fail, |
| 244 'stacktrace_test': chrome_fail, | 247 'stacktrace_test': chrome_fail, |
| 245 'string_interpolate_null_test': fail, | 248 'string_interpolate_null_test': fail, |
| 246 'switch_label2_test': fail, | 249 'switch_label2_test': fail, |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 } | 824 } |
| 822 finish(error); | 825 finish(error); |
| 823 }; | 826 }; |
| 824 | 827 |
| 825 async_helper.asyncTestInitialize(finish); | 828 async_helper.asyncTestInitialize(finish); |
| 826 if (has('slow')) this.timeout(10000); | 829 if (has('slow')) this.timeout(10000); |
| 827 | 830 |
| 828 var result; | 831 var result; |
| 829 try { | 832 try { |
| 830 var result = mainLibrary.main(); | 833 var result = mainLibrary.main(); |
| 831 if (result && !(result instanceof dart_sdk.async.Future)) { | 834 if (result && !(dart_sdk.async.Future.is(result))) { |
| 832 result = null; | 835 result = null; |
| 833 } | 836 } |
| 834 } catch (e) { | 837 } catch (e) { |
| 835 finish(e); | 838 finish(e); |
| 836 } | 839 } |
| 837 | 840 |
| 838 // Ensure this isn't a unittest | 841 // Ensure this isn't a unittest |
| 839 if (!unittestAccidentallyInitialized && | 842 if (!unittestAccidentallyInitialized && |
| 840 unittest.src__test_environment.environment.initialized) { | 843 unittest.src__test_environment.environment.initialized) { |
| 841 // This suppresses duplicate messages for later tests | 844 // This suppresses duplicate messages for later tests |
| 842 unittestAccidentallyInitialized = true; | 845 unittestAccidentallyInitialized = true; |
| 843 finish(new Error('Test ' + name + ' must be marked as a unittest')); | 846 finish(new Error('Test ' + name + ' must be marked as a unittest')); |
| 844 } else if (!async_helper.asyncTestStarted) { | 847 } else if (!async_helper.asyncTestStarted) { |
| 845 if (!result) { | 848 if (!result) { |
| 846 finish(); | 849 finish(); |
| 847 } else { | 850 } else { |
| 848 result.then(dart_sdk.dart.dynamic)(() => finish()); | 851 result.then(dart_sdk.dart.dynamic)(() => finish(), |
| 852 { onError: (e) => finish(e) }); |
| 849 } | 853 } |
| 850 } | 854 } |
| 851 }); | 855 }); |
| 852 } | 856 } |
| 853 } | 857 } |
| 854 | 858 |
| 855 // We run these tests in a mocha test wrapper to avoid the confusing failure | 859 // We run these tests in a mocha test wrapper to avoid the confusing failure |
| 856 // case of dart unittests being interleaved with mocha tests. | 860 // case of dart unittests being interleaved with mocha tests. |
| 857 // In practice we are really just suppressing all mocha test behavior while | 861 // In practice we are really just suppressing all mocha test behavior while |
| 858 // Dart unittests run and then re-enabling it when the dart tests complete. | 862 // Dart unittests run and then re-enabling it when the dart tests complete. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 | 914 |
| 911 for (let action of unittest_tests) { | 915 for (let action of unittest_tests) { |
| 912 try { | 916 try { |
| 913 action(); | 917 action(); |
| 914 } catch (e) { | 918 } catch (e) { |
| 915 console.error("Caught error tying to setup test:", e); | 919 console.error("Caught error tying to setup test:", e); |
| 916 } | 920 } |
| 917 } | 921 } |
| 918 }); | 922 }); |
| 919 }); | 923 }); |
| OLD | NEW |