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

Side by Side Diff: test/mime_multipart_transformer_test.dart

Issue 1317773003: pkg/mime: Use pkg/test (Closed) Base URL: https://github.com/dart-lang/mime.git@master
Patch Set: rebase Created 5 years, 3 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
« no previous file with comments | « pubspec.yaml ('k') | test/mime_type_test.dart » ('j') | 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'; 5 import 'dart:async';
6 import 'dart:math'; 6 import 'dart:math';
7 7
8 import "package:unittest/unittest.dart"; 8 import "package:test/test.dart";
9 import "package:mime/mime.dart"; 9 import "package:mime/mime.dart";
10 10
11 void _writeInChunks(List<int> data, 11 void _writeInChunks(List<int> data,
12 int chunkSize, 12 int chunkSize,
13 StreamController<List<int>> controller) { 13 StreamController<List<int>> controller) {
14 if (chunkSize == -1) chunkSize = data.length; 14 if (chunkSize == -1) chunkSize = data.length;
15 15
16 int written = 0; 16 int written = 0;
17 for (int pos = 0; pos < data.length; pos += chunkSize) { 17 for (int pos = 0; pos < data.length; pos += chunkSize) {
18 int remaining = data.length - pos; 18 int remaining = data.length - pos;
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 \r 456 \r
457 Body2\r 457 Body2\r
458 --xxx\r\n"""; 458 --xxx\r\n""";
459 _testParse(message, "xxx", null, [null, null], true); 459 _testParse(message, "xxx", null, [null, null], true);
460 } 460 }
461 461
462 void main() { 462 void main() {
463 _testParseValid(); 463 _testParseValid();
464 _testParseInvalid(); 464 _testParseInvalid();
465 } 465 }
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | test/mime_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698