refactor(dart): Format Dart code

Use the dart formatter to clean up all pure Dart code.

Closes #4832
This commit is contained in:
Tim Blasi
2015-10-20 09:38:14 -07:00
committed by Timothy Blasi
parent 6be95ae88a
commit fd0ba37734
44 changed files with 326 additions and 258 deletions
@@ -10,7 +10,7 @@ import "dart:convert";
main() {
describe("bootstrapWebWorkerCommon", () {
it ("should bootstrap on a Dart VM", () {
it("should bootstrap on a Dart VM", () {
reflector.reflectionCapabilities = new ReflectionCapabilities();
var buses = createPairedMessageBuses();
bootstrapWebWorkerCommon(App, buses.worker);
@@ -18,6 +18,7 @@ void expectSinkSendsEncodedJson(SpyObject socket, MessageBusSink sink,
}
void expectMessageEquality(String message, Map expectedData, String channel) {
expect(JSON.decode(message))
.toEqual([{'channel': channel, 'message': expectedData}]);
expect(JSON.decode(message)).toEqual([
{'channel': channel, 'message': expectedData}
]);
}
@@ -79,8 +79,9 @@ main() {
var random = new Random();
for (var i = 0; i < numMessages; i++) {
var message = {'value': random.nextInt(MAX)};
messageHistory
.add(JSON.encode([{'channel': CHANNEL, 'message': message}]));
messageHistory.add(JSON.encode([
{'channel': CHANNEL, 'message': message}
]));
}
// copy the message history to ensure the test fails if the wrapper modifies the list
return new List.from(messageHistory);
@@ -189,8 +190,7 @@ main() {
messageHistory, resultMarkers, result.socket);
socket.setPrimary(true);
var source =
new MultiClientServerMessageBusSource();
var source = new MultiClientServerMessageBusSource();
source.onResult.listen((result) => async.done());
source.initChannel(CHANNEL, false);
source.addConnection(socket);
@@ -94,8 +94,9 @@ main() {
async.done();
});
controller
.add(JSON.encode([{'channel': CHANNEL, 'message': MESSAGE}]));
controller.add(JSON.encode([
{'channel': CHANNEL, 'message': MESSAGE}
]));
}));
});
}
@@ -50,8 +50,9 @@ main() {
});
var event = new SpyMessageEvent();
event.spy("get:data").andCallFake(
() => JSON.encode([{'channel': CHANNEL, 'message': MESSAGE}]));
event.spy("get:data").andCallFake(() => JSON.encode([
{'channel': CHANNEL, 'message': MESSAGE}
]));
controller.add(event);
}));
});