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: lib/src/spread_args_helper.dart

Issue 846143003: Reformatted code (Closed) Base URL: https://github.com/dart-lang/unittest.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « lib/src/simple_configuration.dart ('k') | lib/src/test_case.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/spread_args_helper.dart
diff --git a/lib/src/spread_args_helper.dart b/lib/src/spread_args_helper.dart
index 554dcf64c458d7111313299959d8c1af3f20a99d..f93e9ba6133e4e569c9fe39f707d0ab374140fc1 100644
--- a/lib/src/spread_args_helper.dart
+++ b/lib/src/spread_args_helper.dart
@@ -72,15 +72,14 @@ class _SpreadArgsHelper {
// the current test, but we do mark the old test as having an error
// if it previously passed.
if (testCase.result == PASS) {
- testCase._error(
- 'Callback ${id}called ($actualCalls) after test case '
+ testCase._error('Callback ${id}called ($actualCalls) after test case '
'${testCase.description} has already been marked as '
'${testCase.result}.$reason');
}
return false;
} else if (maxExpectedCalls >= 0 && actualCalls > maxExpectedCalls) {
throw new TestFailure('Callback ${id}called more times than expected '
- '($maxExpectedCalls).$reason');
+ '($maxExpectedCalls).$reason');
}
return true;
}
@@ -136,13 +135,11 @@ class _SpreadArgsHelper {
var args = [a0, a1, a2, a3, a4, a5];
args.removeWhere((a) => a == _PLACE_HOLDER);
- return _guardAsync(
- () {
- if (shouldCallBack()) {
- return Function.apply(callback, args);
- }
- },
- after, testCase);
+ return _guardAsync(() {
+ if (shouldCallBack()) {
+ return Function.apply(callback, args);
+ }
+ }, after, testCase);
}
_guardAsync(Function tryBody, Function finallyBody, TestCase testCase) {
« no previous file with comments | « lib/src/simple_configuration.dart ('k') | lib/src/test_case.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698