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

Side by Side Diff: tests/standalone/io/test_runner_exit_code_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "package:expect/expect.dart";
5 import "dart:io"; 6 import "dart:io";
6 7
7 void runTests(String executable, String script, Iterator iterator) { 8 void runTests(String executable, String script, Iterator iterator) {
8 if (iterator.moveNext()) { 9 if (iterator.moveNext()) {
9 var progressIndicator = iterator.current; 10 var progressIndicator = iterator.current;
10 Process.run(executable, [script, progressIndicator]).then((result) { 11 Process.run(executable, [script, progressIndicator]).then((result) {
11 Expect.equals(1, result.exitCode); 12 Expect.equals(1, result.exitCode);
12 if (progressIndicator == 'buildbot') { 13 if (progressIndicator == 'buildbot') {
13 Expect.isTrue(result.stdout.contains("@@@STEP_FAILURE@@@")); 14 Expect.isTrue(result.stdout.contains("@@@STEP_FAILURE@@@"));
14 } 15 }
15 runTests(executable, script, iterator); 16 runTests(executable, script, iterator);
16 }); 17 });
17 } 18 }
18 } 19 }
19 20
20 main() { 21 main() {
21 var scriptPath = new Path(new Options().script); 22 var scriptPath = new Path(new Options().script);
22 var scriptDirPath = scriptPath.directoryPath; 23 var scriptDirPath = scriptPath.directoryPath;
23 var exitCodeScriptPath = 24 var exitCodeScriptPath =
24 scriptDirPath.append('test_runner_exit_code_script.dart'); 25 scriptDirPath.append('test_runner_exit_code_script.dart');
25 var script = exitCodeScriptPath.toNativePath(); 26 var script = exitCodeScriptPath.toNativePath();
26 var executable = new Options().executable; 27 var executable = new Options().executable;
27 var progressTypes = ['compact', 'color', 'line', 'verbose', 28 var progressTypes = ['compact', 'color', 'line', 'verbose',
28 'status', 'buildbot']; 29 'status', 'buildbot'];
29 var iterator = progressTypes.iterator; 30 var iterator = progressTypes.iterator;
30 runTests(executable, script, iterator); 31 runTests(executable, script, iterator);
31 } 32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698