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

Unified Diff: test/media_type_test.dart

Issue 1046573002: pkg/http_parser: format code, prepare for +6 release (Closed) Base URL: https://github.com/dart-lang/http_parser.git@master
Patch Set: cl feedback Created 5 years, 9 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 | « pubspec.yaml ('k') | test/web_socket_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/media_type_test.dart
diff --git a/test/media_type_test.dart b/test/media_type_test.dart
index 14affbb3cc94ce3381cc1f6f26baf4482d3b4efc..fe9005193b205de55126e3bacab65d4a042db80a 100644
--- a/test/media_type_test.dart
+++ b/test/media_type_test.dart
@@ -17,14 +17,14 @@ void main() {
test("allows leading whitespace", () {
expect(new MediaType.parse(" text/plain").mimeType, equals("text/plain"));
- expect(new MediaType.parse("\ttext/plain").mimeType,
- equals("text/plain"));
+ expect(
+ new MediaType.parse("\ttext/plain").mimeType, equals("text/plain"));
});
test("allows trailing whitespace", () {
expect(new MediaType.parse("text/plain ").mimeType, equals("text/plain"));
- expect(new MediaType.parse("text/plain\t").mimeType,
- equals("text/plain"));
+ expect(
+ new MediaType.parse("text/plain\t").mimeType, equals("text/plain"));
});
test("disallows separators in the MIME type", () {
@@ -67,10 +67,8 @@ void main() {
var type = new MediaType.parse(
'text/plain; foo="bar space"; baz="bang\\\\escape"');
expect(type.mimeType, equals("text/plain"));
- expect(type.parameters, equals({
- "foo": "bar space",
- "baz": "bang\\escape"
- }));
+ expect(
+ type.parameters, equals({"foo": "bar space", "baz": "bang\\escape"}));
});
});
@@ -102,14 +100,9 @@ void main() {
});
test("[parameters] overrides and adds to existing parameters", () {
- expect(type.change(parameters: {
- "foo": "zap",
- "qux": "fblthp"
- }).parameters, equals({
- "foo": "zap",
- "baz": "bang",
- "qux": "fblthp"
- }));
+ expect(
+ type.change(parameters: {"foo": "zap", "qux": "fblthp"}).parameters,
+ equals({"foo": "zap", "baz": "bang", "qux": "fblthp"}));
});
test("[clearParameters] removes existing parameters", () {
@@ -117,9 +110,8 @@ void main() {
});
test("[clearParameters] with [parameters] removes before adding", () {
- var newType = type.change(
- parameters: {"foo": "zap"},
- clearParameters: true);
+ var newType =
+ type.change(parameters: {"foo": "zap"}, clearParameters: true);
expect(newType.parameters, equals({"foo": "zap"}));
});
@@ -155,9 +147,8 @@ void main() {
});
test("serializes multiple parameters", () {
- expect(new MediaType("text", "plain", {
- "foo": "bar", "baz": "bang"
- }).toString(), equals("text/plain; foo=bar; baz=bang"));
+ expect(new MediaType("text", "plain", {"foo": "bar", "baz": "bang"})
+ .toString(), equals("text/plain; foo=bar; baz=bang"));
});
});
}
« no previous file with comments | « pubspec.yaml ('k') | test/web_socket_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698