| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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:async'; | 5 import 'dart:async'; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 | 7 |
| 8 import 'package:async/async.dart'; | 8 import 'package:async/async.dart'; |
| 9 | 9 |
| 10 import 'backend/group.dart'; | 10 import 'backend/group.dart'; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 success = results.last; | 123 success = results.last; |
| 124 } | 124 } |
| 125 | 125 |
| 126 if (_closed) return false; | 126 if (_closed) return false; |
| 127 | 127 |
| 128 if (_engine.passed.length == 0 && _engine.failed.length == 0 && | 128 if (_engine.passed.length == 0 && _engine.failed.length == 0 && |
| 129 _engine.skipped.length == 0 && _config.patterns.isNotEmpty) { | 129 _engine.skipped.length == 0 && _config.patterns.isNotEmpty) { |
| 130 var patterns = toSentence(_config.patterns.map( | 130 var patterns = toSentence(_config.patterns.map( |
| 131 (pattern) => pattern is RegExp | 131 (pattern) => pattern is RegExp |
| 132 ? 'regular expression "${pattern.pattern}"' | 132 ? 'regular expression "${pattern.pattern}"' |
| 133 : '"$pattern"')) | 133 : '"$pattern"')); |
| 134 | 134 |
| 135 throw new ApplicationException('No tests match $patterns.'); | 135 throw new ApplicationException('No tests match $patterns.'); |
| 136 } | 136 } |
| 137 | 137 |
| 138 // Explicitly check "== true" here because [Engine.run] can return `null` | 138 // Explicitly check "== true" here because [Engine.run] can return `null` |
| 139 // if the engine was closed prematurely. | 139 // if the engine was closed prematurely. |
| 140 return success == true; | 140 return success == true; |
| 141 } | 141 } |
| 142 | 142 |
| 143 /// Emits a warning if the user is trying to run on a platform that's | 143 /// Emits a warning if the user is trying to run on a platform that's |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 await _debugOperation.valueOrCancellation(); | 350 await _debugOperation.valueOrCancellation(); |
| 351 }).listen(null); | 351 }).listen(null); |
| 352 | 352 |
| 353 var results = await Future.wait([ | 353 var results = await Future.wait([ |
| 354 _suiteSubscription.asFuture().then((_) => _engine.suiteSink.close()), | 354 _suiteSubscription.asFuture().then((_) => _engine.suiteSink.close()), |
| 355 _engine.run() | 355 _engine.run() |
| 356 ]); | 356 ]); |
| 357 return results.last; | 357 return results.last; |
| 358 } | 358 } |
| 359 } | 359 } |
| OLD | NEW |