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

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

Issue 2861783002: fix more mixin tests to work in strong mode (Closed)
Patch Set: Created 3 years, 7 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 function finish(e) { 47 function finish(e) {
48 if (e) { 48 if (e) {
49 console.log('Test ' + test + ' failed:\n' + e.toString()); 49 console.log('Test ' + test + ' failed:\n' + e.toString());
50 sdk.dart.stackPrint(e); 50 sdk.dart.stackPrint(e);
51 } else { 51 } else {
52 console.log('Test ' + test + ' passed.'); 52 console.log('Test ' + test + ' passed.');
53 } 53 }
54 } 54 }
55 55
56 sdk.dart.ignoreWhitelistedErrors(false);
57 sdk.dart.failForWeakModeIsChecks(false);
58 sdk._isolate_helper.startRootIsolate(() => {}, []);
59 // Make it easier to debug test failures and required for formatter test that
60 // assumes custom formatters are enabled.
61 sdk._debugger.registerDevtoolsFormatter();
62
56 var async_helper = requirejs('async_helper').async_helper; 63 var async_helper = requirejs('async_helper').async_helper;
57 sdk._isolate_helper.startRootIsolate(() => {}, []);
58 async_helper.asyncTestInitialize(finish); 64 async_helper.asyncTestInitialize(finish);
59 65
60 var module = requirejs(test); 66 var module = requirejs(test);
61 var lib = test.split('/').slice(-1)[0]; 67 var lib = test.split('/').slice(-1)[0];
62 try { 68 try {
63 var result = module[lib].main(); 69 var result = module[lib].main();
64 // async_helper tests call finish directly - call here for all other 70 // async_helper tests call finish directly - call here for all other
65 // tests. 71 // tests.
66 if (!async_helper.asyncTestStarted) { 72 if (!async_helper.asyncTestStarted) {
67 if (!result || !(sdk.async.Future.is(result))) { 73 if (!result || !(sdk.async.Future.is(result))) {
68 finish(); 74 finish();
69 } else { 75 } else {
70 // Wait iff result is a future 76 // Wait iff result is a future
71 result.then(sdk.dart.dynamic)(() => finish(), { onError: (e) => finish(e) }); 77 result.then(sdk.dart.dynamic)(() => finish(), { onError: (e) => finish(e) });
72 } 78 }
73 } 79 }
74 } catch (e) { 80 } catch (e) {
75 finish(e); 81 finish(e);
76 } 82 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/test/not_yet_strong_tests.dart ('k') | tests/language_strong/mixin_extends_field_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698