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

Unified Diff: pkg/analyzer/test/cancelable_future_test.dart

Issue 975453004: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | « pkg/analyzer/lib/task/model.dart ('k') | pkg/analyzer/test/enum_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/cancelable_future_test.dart
diff --git a/pkg/analyzer/test/cancelable_future_test.dart b/pkg/analyzer/test/cancelable_future_test.dart
index 825945d717a440cb709ea1aa1505347dd7eefc4c..c9d88f29ccbd0d23845a075952ca34486991538c 100644
--- a/pkg/analyzer/test/cancelable_future_test.dart
+++ b/pkg/analyzer/test/cancelable_future_test.dart
@@ -70,7 +70,8 @@ class CancelableFutureTests {
Future test_delayed_noCallback() {
DateTime start = new DateTime.now();
- return new CancelableFuture.delayed(new Duration(seconds: 1)).then((result) {
+ return new CancelableFuture.delayed(new Duration(seconds: 1)).then(
+ (result) {
DateTime end = new DateTime.now();
expect(result, isNull);
expect(end.difference(start).inMilliseconds > 900, isTrue);
@@ -146,7 +147,9 @@ class CancelableCompleterTests {
int cancelCount = 0;
void setUp() {
- completer = new CancelableCompleter<Object>(() { cancelCount++; });
+ completer = new CancelableCompleter<Object>(() {
+ cancelCount++;
+ });
}
void test_initialState() {
@@ -158,16 +161,24 @@ class CancelableCompleterTests {
// As with an ordinary Completer, calling complete() (or completeError)
// after calling complete() should throw an exception.
completer.complete();
- expect(() { completer.complete(); }, throws);
- expect(() { completer.completeError(new Object()); }, throws);
+ expect(() {
+ completer.complete();
+ }, throws);
+ expect(() {
+ completer.completeError(new Object());
+ }, throws);
}
void test_complete_after_completeError() {
// As with an ordinary Completer, calling complete() (or completeError)
// after calling completeError() should throw an exception.
completer.completeError(new Object());
- expect(() { completer.complete(); }, throws);
- expect(() { completer.completeError(new Object()); }, throws);
+ expect(() {
+ completer.complete();
+ }, throws);
+ expect(() {
+ completer.completeError(new Object());
+ }, throws);
// Now absorb the error that's in the completer's future.
completer.future.catchError((_) => null);
}
@@ -394,4 +405,4 @@ class CancelableCompleterTests {
expect(cancelCount, 1);
});
}
-}
+}
« no previous file with comments | « pkg/analyzer/lib/task/model.dart ('k') | pkg/analyzer/test/enum_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698