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

Unified Diff: lib/unittest/unittest.dart

Issue 10382094: Refactor the pub tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
Index: lib/unittest/unittest.dart
diff --git a/lib/unittest/unittest.dart b/lib/unittest/unittest.dart
index 769b05eabe633655a6e4e2c36601af3b280f5b15..5ac04a0c52e526c734ccae7ac7c255572d28bcfd 100644
--- a/lib/unittest/unittest.dart
+++ b/lib/unittest/unittest.dart
@@ -285,7 +285,7 @@ class _SpreadArgsHelper {
invoke([arg0 = _sentinel, arg1 = _sentinel, arg2 = _sentinel,
arg3 = _sentinel, arg4 = _sentinel]) {
- return _guard(() {
+ return guard(() {
if (!_incrementCall()) {
return;
} else if (arg0 == _sentinel) {
@@ -308,19 +308,19 @@ class _SpreadArgsHelper {
}
invoke0() {
- return _guard(
+ return guard(
() => _incrementCall() ? callback() : null,
() { if (calls == expectedCalls) callbackDone(); });
}
invoke1(arg1) {
- return _guard(
+ return guard(
() => _incrementCall() ? callback(arg1) : null,
() { if (calls == expectedCalls) callbackDone(); });
}
invoke2(arg1, arg2) {
- return _guard(
+ return guard(
() => _incrementCall() ? callback(arg1, arg2) : null,
() { if (calls == expectedCalls) callbackDone(); });
}
@@ -468,7 +468,7 @@ _runTests() {
* Run [tryBody] guarded in a try-catch block. If an exception is thrown, update
* the [_currentTest] status accordingly.
*/
-_guard(tryBody, [finallyBody]) {
+guard(tryBody, [finallyBody]) {
Bob Nystrom 2012/05/10 20:15:10 If we're going to make this public, we should give
nweiz 2012/05/10 21:01:09 I don't have any great ideas for this name. Maybe
try {
return tryBody();
} catch (ExpectException e, var trace) {
@@ -501,7 +501,7 @@ _guard(tryBody, [finallyBody]) {
_nextBatch() {
while (_currentTest < _tests.length) {
final testCase = _tests[_currentTest];
- _guard(() {
+ guard(() {
_callbacksCalled = 0;
_state = _RUNNING_TEST;
« no previous file with comments | « lib/unittest/config.dart ('k') | utils/pub/pub.dart » ('j') | utils/tests/pub/test_pub.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698