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

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

Issue 12770017: pkg/unittest: config refactor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixed scheduled_test test Created 7 years, 9 months 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
« pkg/unittest/lib/unittest.dart ('K') | « pkg/unittest/lib/vm_config.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/unittest_test.dart
diff --git a/pkg/unittest/test/unittest_test.dart b/pkg/unittest/test/unittest_test.dart
index e0127bd6d507f6de64f5bc38d49c96252005cb71..31d5bcc285f2f625b6e49c1cf168ae52bd48cc01 100644
--- a/pkg/unittest/test/unittest_test.dart
+++ b/pkg/unittest/test/unittest_test.dart
@@ -17,7 +17,6 @@ import 'package:unittest/unittest.dart';
var tests; // array of test names
var expected; // array of test expected results (from buildStatusString)
var actual; // actual test results (from buildStatusString in config.onDone)
-var _testconfig; // test configuration to capture onDone
Future _defer(void fn()) {
return new Future.of(fn);
@@ -54,7 +53,7 @@ class TestConfiguration extends Configuration {
String teardown = ''; // the name of the test group teardown function, if any
// The port to communicate with the parent isolate
- SendPort _port;
+ final SendPort _port;
String _result;
TestConfiguration(this._port);
@@ -73,7 +72,9 @@ class TestConfiguration extends Configuration {
runTest() {
port.receive((testName, sendport) {
- configure(_testconfig = new TestConfiguration(sendport));
+ var _testconfig= new TestConfiguration(sendport);
+ unittestConfiguration = _testconfig;
+
if (testName == 'single correct test') {
test(testName, () => expect(2 + 3, equals(5)));
} else if (testName == 'single failing test') {
« pkg/unittest/lib/unittest.dart ('K') | « pkg/unittest/lib/vm_config.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698