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

Unified Diff: test/message_test.dart

Issue 837193005: pkg/shelf: formatted code (Closed) Base URL: https://github.com/dart-lang/shelf.git@master
Patch Set: nits 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 | « test/message_change_test.dart ('k') | test/pipeline_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/message_test.dart
diff --git a/test/message_test.dart b/test/message_test.dart
index 1d8411028cb1dd465dc3bcd510de4419e0014442..669d9ffc1cbddd76378c633b2c66837c23467ab7 100644
--- a/test/message_test.dart
+++ b/test/message_test.dart
@@ -14,8 +14,7 @@ import 'test_util.dart';
class _TestMessage extends Message {
_TestMessage(Map<String, String> headers, Map<String, Object> context,
- Stream<List<int>> body)
- : super(body, headers: headers, context: context);
+ Stream<List<int>> body) : super(body, headers: headers, context: context);
Message change({Map<String, String> headers, Map<String, Object> context}) {
throw new UnimplementedError();
@@ -119,10 +118,8 @@ void main() {
test("supports a Stream<List<int>> body", () {
var controller = new StreamController();
var request = _createMessage(body: controller.stream);
- expect(request.read().toList(), completion(equals([
- HELLO_BYTES,
- WORLD_BYTES
- ])));
+ expect(request.read().toList(),
+ completion(equals([HELLO_BYTES, WORLD_BYTES])));
controller.add(HELLO_BYTES);
return new Future(() {
@@ -160,9 +157,7 @@ void main() {
});
test("comes from the content-length header", () {
- var request = _createMessage(headers: {
- 'content-length': '42'
- });
+ var request = _createMessage(headers: {'content-length': '42'});
expect(request.contentLength, 42);
});
});
@@ -173,13 +168,13 @@ void main() {
});
test("comes from the content-type header", () {
- expect(_createMessage(headers: {
- 'content-type': 'text/plain'
- }).mimeType, equals('text/plain'));
+ expect(_createMessage(headers: {'content-type': 'text/plain'}).mimeType,
+ equals('text/plain'));
});
test("doesn't include parameters", () {
- expect(_createMessage(headers: {
+ expect(_createMessage(
+ headers: {
'content-type': 'text/plain; foo=bar; bar=baz'
}).mimeType, equals('text/plain'));
});
@@ -191,19 +186,19 @@ void main() {
});
test("is null without a charset parameter", () {
- expect(_createMessage(headers: {
- 'content-type': 'text/plain'
- }).encoding, isNull);
+ expect(_createMessage(headers: {'content-type': 'text/plain'}).encoding,
+ isNull);
});
test("is null with an unrecognized charset parameter", () {
- expect(_createMessage(headers: {
- 'content-type': 'text/plain; charset=fblthp'
- }).encoding, isNull);
+ expect(_createMessage(
+ headers: {'content-type': 'text/plain; charset=fblthp'}).encoding,
+ isNull);
});
test("comes from the content-type charset parameter", () {
- expect(_createMessage(headers: {
+ expect(_createMessage(
+ headers: {
'content-type': 'text/plain; charset=iso-8859-1'
}).encoding, equals(LATIN1));
});
« no previous file with comments | « test/message_change_test.dart ('k') | test/pipeline_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698