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

Unified Diff: pkg/unittest/test/with_test_environment_test.dart

Issue 740323002: Incorporating nweiz' feedback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/with_test_environment_test.dart
diff --git a/pkg/unittest/test/with_test_environment_test.dart b/pkg/unittest/test/with_test_environment_test.dart
index 6f484af820d491f6ad0f4666ff5e8c568aeeb5e1..ae35c206de5aa4d45fb81689a41a0f6b8000516b 100644
--- a/pkg/unittest/test/with_test_environment_test.dart
+++ b/pkg/unittest/test/with_test_environment_test.dart
@@ -22,19 +22,13 @@ class TestConfiguration extends SimpleConfiguration {
Future get done => _completer.future;
onDone(success) {
- new Future.sync(() {
- super.onDone(success);
- }).then((_) => _completer.complete(_))
- .catchError((error, stack) => _completer.completeError(error, stack));
+ new Future.sync(() => super.onDone(success))
+ .then(_completer.complete)
+ .catchError(_completer.completeError);
}
bool checkIfTestRan(String testName) {
- for (final t in _results) {
- if (t.description == testName) {
- return true;
- }
- }
- return false;
+ return _results.any((test) => test.description == testName);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698