| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library summary_report; | 5 library summary_report; |
| 6 | 6 |
| 7 import "status_file_parser.dart"; | 7 import "status_file_parser.dart"; |
| 8 import "test_runner.dart"; | 8 import "test_runner.dart"; |
| 9 | 9 |
| 10 final summaryReport = new SummaryReport(); | 10 final summaryReport = new SummaryReport(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 int get bogus => _nonStandardTestCases.length; | 29 int get bogus => _nonStandardTestCases.length; |
| 30 | 30 |
| 31 final List<TestCase> _nonStandardTestCases = <TestCase>[]; | 31 final List<TestCase> _nonStandardTestCases = <TestCase>[]; |
| 32 | 32 |
| 33 void add(TestCase testCase) { | 33 void add(TestCase testCase) { |
| 34 var expectations = testCase.expectedOutcomes; | 34 var expectations = testCase.expectedOutcomes; |
| 35 | 35 |
| 36 bool containsFail = expectations | 36 bool containsFail = expectations |
| 37 .any((expectation) => expectation.canBeOutcomeOf(Expectation.FAIL)); | 37 .any((expectation) => expectation.canBeOutcomeOf(Expectation.FAIL)); |
| 38 bool containsPass = expectations.contains(Expectation.PASS); | 38 bool containsPass = expectations.contains(Expectation.PASS); |
| 39 bool containsSkip = expectations.contains(Expectation.SKIP); | 39 bool containsSkip = expectations |
| 40 .any((expectation) => expectation.canBeOutcomeOf(Expectation.SKIP)); |
| 40 bool containsSkipByDesign = | 41 bool containsSkipByDesign = |
| 41 expectations.contains(Expectation.SKIP_BY_DESIGN); | 42 expectations.contains(Expectation.SKIP_BY_DESIGN); |
| 42 bool containsCrash = expectations.contains(Expectation.CRASH); | 43 bool containsCrash = expectations.contains(Expectation.CRASH); |
| 43 bool containsOK = expectations.contains(Expectation.OK); | 44 bool containsOK = expectations.contains(Expectation.OK); |
| 44 bool containsSlow = expectations.contains(Expectation.SLOW); | 45 bool containsSlow = expectations.contains(Expectation.SLOW); |
| 45 bool containsTimeout = expectations.contains(Expectation.TIMEOUT); | 46 bool containsTimeout = expectations.contains(Expectation.TIMEOUT); |
| 46 | 47 |
| 47 ++_total; | 48 ++_total; |
| 48 if (containsSkip) { | 49 if (containsSkip) { |
| 49 ++_skipped; | 50 ++_skipped; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 * $_timeout tests are allowed to timeout | 125 * $_timeout tests are allowed to timeout |
| 125 * $_compileErrorSkip tests are skipped on browsers due to compile-time error | 126 * $_compileErrorSkip tests are skipped on browsers due to compile-time error |
| 126 * $bogus could not be categorized or are in multiple categories | 127 * $bogus could not be categorized or are in multiple categories |
| 127 """; | 128 """; |
| 128 | 129 |
| 129 void printReport() { | 130 void printReport() { |
| 130 if (_total == 0) return; | 131 if (_total == 0) return; |
| 131 print(report); | 132 print(report); |
| 132 } | 133 } |
| 133 } | 134 } |
| OLD | NEW |