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

Unified Diff: pkg/unittest/lib/unittest.dart

Issue 734343002: Fix bug in the unittest's withTestEnvironment package and apply more feedback from nweiz. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: review feedback 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
Index: pkg/unittest/lib/unittest.dart
diff --git a/pkg/unittest/lib/unittest.dart b/pkg/unittest/lib/unittest.dart
index 268eff6d48a2bd402915e05d826210cc502e936c..3661f992c8cfeb8ae41bfd773a12377e4dcdbfad 100644
--- a/pkg/unittest/lib/unittest.dart
+++ b/pkg/unittest/lib/unittest.dart
@@ -162,8 +162,7 @@ final _TestEnvironment _defaultEnvironment = new _TestEnvironment();
*/
_TestEnvironment get _environment {
var environment = Zone.current[_UNITTEST_ENVIRONMENT];
- if (environment == null)
- return _defaultEnvironment;
+ if (environment == null) return _defaultEnvironment;
return environment;
}
@@ -210,7 +209,7 @@ void logMessage(String message) =>
String groupSep = ' ';
/// Tests executed in this suite.
-final List<TestCase> testCases =
+List<TestCase> get testCases =>
new UnmodifiableListView<TestCase>(_environment.testCases);
/// Interval (in msecs) after which synchronous tests will insert an async

Powered by Google App Engine
This is Rietveld 408576698