Index: tests/standalone/io/mime_multipart_parser_test.dart |
diff --git a/tests/standalone/io/mime_multipart_parser_test.dart b/tests/standalone/io/mime_multipart_parser_test.dart |
index d9457c768b9f1629a402c99fd18463cf1bdaf400..506a46e6b7a518a0ab17bf573f121d48a2d0f55c 100644 |
--- a/tests/standalone/io/mime_multipart_parser_test.dart |
+++ b/tests/standalone/io/mime_multipart_parser_test.dart |
@@ -68,15 +68,13 @@ void testParse(String message, |
if (chunkSize == -1) chunkSize = data.length; |
reset(); |
int written = 0; |
- int unparsed; |
for (int pos = 0; pos < data.length; pos += chunkSize) { |
int remaining = data.length - pos; |
int writeLength = min(chunkSize, remaining); |
- written += writeLength; |
int parsed = |
- parser.update(data.getRange(pos, writeLength), 0, writeLength); |
- unparsed = writeLength - parsed; |
- Expect.equals(0, unparsed); |
+ parser.update(data.sublist(pos, pos + writeLength), 0, writeLength); |
+ Expect.equals(writeLength, parsed); |
+ written += writeLength; |
} |
Expect.isTrue(lastPartCalled); |
} |