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: tests/isolate/mint_maker_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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: tests/isolate/mint_maker_test.dart
diff --git a/tests/isolate/mint_maker_test.dart b/tests/isolate/mint_maker_test.dart
index fa200fcfd9541eb7b165a171a513897e9578c13d..d9346d07a4b4c5f058f595666012f9f60c8edb35 100644
--- a/tests/isolate/mint_maker_test.dart
+++ b/tests/isolate/mint_maker_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
library MintMakerTest;
+
import 'dart:async';
import 'dart:isolate';
import 'package:unittest/unittest.dart';
@@ -37,7 +38,6 @@ class Mint {
}
}
-
class MintWrapper {
SendPort _mint;
MintWrapper(SendPort this._mint) {}
@@ -49,7 +49,6 @@ class MintWrapper {
});
_mint.send([balance, reply.sendPort]);
}
-
}
class Purse {
@@ -83,9 +82,13 @@ class Purse {
});
}
- int queryBalance() { return balance; }
+ int queryBalance() {
+ return balance;
+ }
- Purse sproutPurse() { return mint.createPurse(0); }
+ Purse sproutPurse() {
+ return mint.createPurse(0);
+ }
void deposit(int amount, Purse source) {
// TODO: Throw an exception if the source purse doesn't hold
@@ -95,7 +98,6 @@ class Purse {
}
}
-
class PurseWrapper {
SendPort _purse;
@@ -118,7 +120,7 @@ class PurseWrapper {
}
void deposit(PurseWrapper source, int amount) {
- _purse.send([ "deposit", amount, source._purse ]);
+ _purse.send(["deposit", amount, source._purse]);
}
}
@@ -136,15 +138,18 @@ class MintMakerWrapper {
static Future<MintMakerWrapper> create() {
ReceivePort reply = new ReceivePort();
- return Isolate.spawn(mintMakerWrapper, reply.sendPort).then((_) =>
- reply.first.then((port) => new MintMakerWrapper._(port)));
+ return Isolate
+ .spawn(mintMakerWrapper, reply.sendPort)
+ .then((_) => reply.first.then((port) => new MintMakerWrapper._(port)));
}
MintMakerWrapper._(this._port);
void makeMint(handleMint(MintWrapper mint)) {
ReceivePort reply = new ReceivePort();
- reply.first.then((SendPort mint) { handleMint(new MintWrapper(mint)); });
+ reply.first.then((SendPort mint) {
+ handleMint(new MintWrapper(mint));
+ });
_port.send(reply.sendPort);
}
}

Powered by Google App Engine
This is Rietveld 408576698