Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 // Simulates the a use of test_progress during a failing run of test.dart. | |
|
ricow1
2012/10/06 16:38:52
the a -> the
Mads Ager (google)
2012/10/08 07:28:45
Done.
| |
| 6 | |
| 7 #import("../../../tools/testing/dart/test_progress.dart"); | |
| 8 #import("../../../tools/testing/dart/test_runner.dart"); | |
| 9 #import("../../../tools/testing/dart/test_options.dart"); | |
| 10 | |
| 11 main() { | |
| 12 var progressType = new Options().arguments[0]; | |
| 13 // Build a progress indicator. | |
| 14 var startTime = new Date.now(); | |
| 15 var progress = | |
| 16 new ProgressIndicator.fromName(progressType, startTime, false); | |
| 17 // Build a dummy test case. | |
| 18 var configuration = new TestOptionsParser().parse(['--timeout', '2'])[0]; | |
| 19 var testCase = new TestCase('failing_test.dart', | |
| 20 [], | |
| 21 configuration, | |
| 22 (_) => null, | |
| 23 new Set<String>.from(['PASS'])); | |
| 24 // Simulate the test.dart use of the progress indicator. | |
| 25 progress.testAdded(); | |
| 26 progress.allTestsKnown(); | |
| 27 progress.start(testCase); | |
| 28 new TestOutput.fromCase(testCase, 1, false, false, [], [], | |
| 29 new Date.now().difference(startTime)); | |
| 30 progress.done(testCase); | |
| 31 progress.allDone(); | |
| 32 } | |
| OLD | NEW |