Index: client/testing/unittest/shared.dart |
=================================================================== |
--- client/testing/unittest/shared.dart (revision 2358) |
+++ client/testing/unittest/shared.dart (working copy) |
@@ -11,6 +11,9 @@ |
/** Tests executed in this suite. */ |
List<TestCase> _tests; |
+/** Test Runner Function */ |
Bob Nystrom
2011/12/14 00:15:30
This comment doesn't really add any value. How abo
shauvik
2011/12/16 07:19:27
Done.
|
+Function _testRunner; |
Bob Nystrom
2011/12/14 00:15:30
Rename "_runTests".
shauvik
2011/12/16 07:19:27
There is already a function called "_runTests". Ca
|
+ |
/** Whether this is run within dartium layout tests. */ |
bool _isLayoutTest = false; |
@@ -138,7 +141,7 @@ |
(_state != _RUNNING_TEST)) { |
testCase.pass(); |
_currentTest++; |
- _nextBatch(); |
+ _testRunner(); |
} |
} |
@@ -152,7 +155,7 @@ |
_platformDefer(() { |
assert (_currentTest == 0); |
- _nextBatch(); |
+ _testRunner(); |
}); |
} |
@@ -237,6 +240,10 @@ |
_tests = <TestCase>[]; |
_currentGroup = ''; |
_state = _READY; |
+ |
+ //Set _nextBatch() as default test runner |
Bob Nystrom
2011/12/14 00:15:30
Obvious comment is obvious. Remove it. :)
shauvik
2011/12/16 07:19:27
Done.
|
+ _testRunner = _nextBatch; |
+ |
_platformInitialize(); |
@@ -327,9 +334,17 @@ |
/** Stack trace associated with this test, or null if it succeeded. */ |
String stackTrace; |
+ |
+ Date startDate; |
Bob Nystrom
2011/12/14 00:15:30
Rename "startTime".
shauvik
2011/12/16 07:19:27
Done.
|
+ |
+ Duration timeDuration; |
Bob Nystrom
2011/12/14 00:15:30
Rename "runningTime".
shauvik
2011/12/16 07:19:27
Done.
|
TestCase(this.id, this.description, this.test, this.callbacks); |
+ set startingDate(Date startDate) => this.startDate = startDate; |
Bob Nystrom
2011/12/14 00:15:30
Remove this.
shauvik
2011/12/16 07:19:27
Done.
|
+ |
+ set runningTime(Duration timeDuration) => this.timeDuration = timeDuration; |
Bob Nystrom
2011/12/14 00:15:30
And this.
shauvik
2011/12/16 07:19:27
Done.
|
+ |
bool get isComplete() => result != null; |
void pass() { |