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

Side by Side Diff: pkg/mime/test/mime_multipart_transformer_test.dart

Issue 272353002: pkg/mime: layout as mini-libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« pkg/mime/pubspec.yaml ('K') | « pkg/mime/pubspec.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async';
6 import 'dart:math';
7
5 import "package:unittest/unittest.dart"; 8 import "package:unittest/unittest.dart";
6 import "package:mime/mime.dart"; 9 import "package:mime/mime.dart";
7 import 'dart:async';
8 import 'dart:math';
9 10
10 void testParse(String message, 11 void testParse(String message,
11 String boundary, 12 String boundary,
12 [List<Map> expectedHeaders, 13 [List<Map> expectedHeaders,
13 List expectedParts, 14 List expectedParts,
14 bool expectError = false]) { 15 bool expectError = false]) {
15 Future testWrite(List<int> data, [int chunkSize = -1]) { 16 Future testWrite(List<int> data, [int chunkSize = -1]) {
16 StreamController controller = new StreamController(sync: true); 17 StreamController controller = new StreamController(sync: true);
17 18
18 var stream = controller.stream.transform( 19 var stream = controller.stream.transform(
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 \r 314 \r
314 Body2\r 315 Body2\r
315 --xxx\r\n"""; 316 --xxx\r\n""";
316 testParse(message, "xxx", null, [null, null], true); 317 testParse(message, "xxx", null, [null, null], true);
317 } 318 }
318 319
319 void main() { 320 void main() {
320 testParseValid(); 321 testParseValid();
321 testParseInvalid(); 322 testParseInvalid();
322 } 323 }
OLDNEW
« pkg/mime/pubspec.yaml ('K') | « pkg/mime/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698