Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: pkg/dev_compiler/tool/run.js

Issue 2996573002: fix #28988, remove throw on Dart1 incompatible is-checks for dartdevc (Closed)
Patch Set: fix changelog Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /// This is a utility to run and debug an individual DDC compiled test. 5 /// This is a utility to run and debug an individual DDC compiled test.
6 /// Tests can be run with either node or devtool (a Chrome-based utility with 6 /// Tests can be run with either node or devtool (a Chrome-based utility with
7 /// DOM APIs and developer tools support). 7 /// DOM APIs and developer tools support).
8 /// 8 ///
9 /// Install devtool via: 9 /// Install devtool via:
10 /// > npm install -g devtool 10 /// > npm install -g devtool
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 if (e) { 56 if (e) {
57 console.log('Test ' + test + ' failed:\n' + e.toString()); 57 console.log('Test ' + test + ' failed:\n' + e.toString());
58 sdk.dart.stackPrint(e); 58 sdk.dart.stackPrint(e);
59 } else { 59 } else {
60 console.log('Test ' + test + ' passed.'); 60 console.log('Test ' + test + ' passed.');
61 } 61 }
62 } 62 }
63 63
64 sdk.dart.ignoreWhitelistedErrors(false); 64 sdk.dart.ignoreWhitelistedErrors(false);
65 sdk.dart.failForWeakModeIsChecks(false);
66 sdk._isolate_helper.startRootIsolate(() => {}, []); 65 sdk._isolate_helper.startRootIsolate(() => {}, []);
67 // Make it easier to debug test failures and required for formatter test that 66 // Make it easier to debug test failures and required for formatter test that
68 // assumes custom formatters are enabled. 67 // assumes custom formatters are enabled.
69 sdk._debugger.registerDevtoolsFormatter(); 68 sdk._debugger.registerDevtoolsFormatter();
70 69
71 var async_helper = requirejs('async_helper').async_helper; 70 var async_helper = requirejs('async_helper').async_helper;
72 async_helper.asyncTestInitialize(finish); 71 async_helper.asyncTestInitialize(finish);
73 72
74 var module = requirejs(test); 73 var module = requirejs(test);
75 var lib = test.split('/').slice(-1)[0]; 74 var lib = test.split('/').slice(-1)[0];
76 try { 75 try {
77 if (module[lib]._expectRuntimeError) negative = true; 76 if (module[lib]._expectRuntimeError) negative = true;
78 var result = module[lib].main(); 77 var result = module[lib].main();
79 // async_helper tests call finish directly - call here for all other 78 // async_helper tests call finish directly - call here for all other
80 // tests. 79 // tests.
81 if (!async_helper.asyncTestStarted) { 80 if (!async_helper.asyncTestStarted) {
82 if (!result || !(sdk.async.Future.is(result))) { 81 if (!result || !(sdk.async.Future.is(result))) {
83 finish(); 82 finish();
84 } else { 83 } else {
85 // Wait iff result is a future 84 // Wait iff result is a future
86 result.then(sdk.dart.dynamic)(() => finish(), { onError: (e) => finish(e) }); 85 result.then(sdk.dart.dynamic)(() => finish(), { onError: (e) => finish(e) });
87 } 86 }
88 } 87 }
89 } catch (e) { 88 } catch (e) {
90 finish(e); 89 finish(e);
91 } 90 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart ('k') | tests/corelib_2/corelib_2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698