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

Side by Side Diff: tools/testing/dart/command_output.dart

Issue 2955513002: Dynamically load packages for dartdevc tests in test.dart. (Closed)
Patch Set: Created 3 years, 5 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:convert'; 5 import 'dart:convert';
6 // We need to use the 'io' prefix here, otherwise io.exitCode will shadow 6 // We need to use the 'io' prefix here, otherwise io.exitCode will shadow
7 // CommandOutput.exitCode in subclasses of CommandOutput. 7 // CommandOutput.exitCode in subclasses of CommandOutput.
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 9
10 import 'browser_controller.dart'; 10 import 'browser_controller.dart';
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 bool get canRunDependendCommands { 77 bool get canRunDependendCommands {
78 // FIXME(kustermann): We may need to change this 78 // FIXME(kustermann): We may need to change this
79 return !hasTimedOut && exitCode == 0; 79 return !hasTimedOut && exitCode == 0;
80 } 80 }
81 81
82 bool get successful { 82 bool get successful {
83 // FIXME(kustermann): We may need to change this 83 // FIXME(kustermann): We may need to change this
84 return !hasTimedOut && exitCode == 0; 84 return !hasTimedOut && exitCode == 0;
85 } 85 }
86 86
87 // TODO(bob): Remove.
88 // Reverse result of a negative test. 87 // Reverse result of a negative test.
89 bool hasFailed(TestCase testCase) { 88 bool hasFailed(TestCase testCase) {
90 return testCase.isNegative ? !_didFail(testCase) : _didFail(testCase); 89 return testCase.isNegative ? !_didFail(testCase) : _didFail(testCase);
91 } 90 }
92 91
93 bool get hasNonUtf8 => exitCode == nonUtfFakeExitCode; 92 bool get hasNonUtf8 => exitCode == nonUtfFakeExitCode;
94 93
95 Expectation _negateOutcomeIfNegativeTest( 94 Expectation _negateOutcomeIfNegativeTest(
96 Expectation outcome, bool isNegative) { 95 Expectation outcome, bool isNegative) {
97 if (!isNegative) return outcome; 96 if (!isNegative) return outcome;
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 // complete successfully, it's outcome is Expectation.FAIL. 829 // complete successfully, it's outcome is Expectation.FAIL.
831 // TODO: maybe we should introduce a AsyncIncomplete marker or so 830 // TODO: maybe we should introduce a AsyncIncomplete marker or so
832 if (outcome == Expectation.pass) { 831 if (outcome == Expectation.pass) {
833 if (_isAsyncTest(testOutput) && !_isAsyncTestSuccessful(testOutput)) { 832 if (_isAsyncTest(testOutput) && !_isAsyncTestSuccessful(testOutput)) {
834 return Expectation.fail; 833 return Expectation.fail;
835 } 834 }
836 } 835 }
837 return outcome; 836 return outcome;
838 } 837 }
839 } 838 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698