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

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

Issue 11348060: Revert of commit 14947 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | tests/standalone/io/test_runner_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Simulates a use of test_progress during a failing run of test.dart. 5 // Simulates a use of test_progress during a failing run of test.dart.
6 6
7 #import("../../../tools/testing/dart/test_progress.dart"); 7 #import("../../../tools/testing/dart/test_progress.dart");
8 #import("../../../tools/testing/dart/test_runner.dart"); 8 #import("../../../tools/testing/dart/test_runner.dart");
9 #import("../../../tools/testing/dart/test_options.dart"); 9 #import("../../../tools/testing/dart/test_options.dart");
10 10
11 main() { 11 main() {
12 var progressType = new Options().arguments[0]; 12 var progressType = new Options().arguments[0];
13 // Build a progress indicator. 13 // Build a progress indicator.
14 var startTime = new Date.now(); 14 var startTime = new Date.now();
15 var progress = 15 var progress =
16 new ProgressIndicator.fromName(progressType, startTime, false); 16 new ProgressIndicator.fromName(progressType, startTime, false);
17 // Build a dummy test case. 17 // Build a dummy test case.
18 var configuration = new TestOptionsParser().parse(['--timeout', '2'])[0]; 18 var configuration = new TestOptionsParser().parse(['--timeout', '2'])[0];
19 var dummyCommand = new Command("noop", []);
20 var testCase = new TestCase('failing_test.dart', 19 var testCase = new TestCase('failing_test.dart',
21 [dummyCommand], 20 [],
22 configuration, 21 configuration,
23 (_) => null, 22 (_) => null,
24 new Set<String>.from(['PASS'])); 23 new Set<String>.from(['PASS']));
25
26 // Simulate the test.dart use of the progress indicator. 24 // Simulate the test.dart use of the progress indicator.
27 progress.testAdded(); 25 progress.testAdded();
28 progress.allTestsKnown(); 26 progress.allTestsKnown();
29 progress.start(testCase); 27 progress.start(testCase);
30 new CommandOutput.fromCase(testCase, dummyCommand, 1, false, false, [], [], 28 new TestOutput.fromCase(testCase, 1, false, false, [], [],
31 new Date.now().difference(startTime)); 29 new Date.now().difference(startTime));
32 progress.done(testCase); 30 progress.done(testCase);
33 progress.allDone(); 31 progress.allDone();
34 } 32 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/io/test_runner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698