Index: tests/lib/convert/utf8_test.dart |
diff --git a/tests/lib/convert/utf8_test.dart b/tests/lib/convert/utf8_test.dart |
index c63ae8b85d26de6e1ea3bae3562fea25efbc053c..e731a2c1120b7c7a82e753326c341bd4ff5060c5 100644 |
--- a/tests/lib/convert/utf8_test.dart |
+++ b/tests/lib/convert/utf8_test.dart |
@@ -20,7 +20,7 @@ void main() { |
} |
void testDecodeSlice() { |
- var decoder = UTF8.decoder; // Doesn't allow malformed. |
+ var decoder = UTF8.decoder; // Doesn't allow malformed. |
var ascii = [0x41, 0x42, 0x43, 0x44, 0x45]; |
Expect.equals("ABCDE", decoder.convert(ascii)); |
Expect.equals("ABCDE", decoder.convert(ascii, 0)); |
@@ -32,8 +32,8 @@ void testDecodeSlice() { |
Expect.throws(() => decoder.convert(ascii, -1)); // start < 0. |
Expect.throws(() => decoder.convert(ascii, 6)); // start > length |
Expect.throws(() => decoder.convert(ascii, 0, -1)); // end < 0 |
- Expect.throws(() => decoder.convert(ascii, 0, 6)); // end > length |
- Expect.throws(() => decoder.convert(ascii, 3, 2)); // end < start |
+ Expect.throws(() => decoder.convert(ascii, 0, 6)); // end > length |
+ Expect.throws(() => decoder.convert(ascii, 3, 2)); // end < start |
var utf8 = [0xc2, 0x81, 0xc2, 0x82, 0xe1, 0x81, 0x81]; |
Expect.equals("\u0081\u0082\u1041", decoder.convert(utf8)); |
@@ -48,10 +48,9 @@ void testDecodeSlice() { |
void testErrorOffset() { |
// Test that failed convert calls have an offset in the exception. |
testExn(input, offset) { |
- Expect.throws(() { UTF8.decoder.convert(input); }, |
- (e) => e is FormatException && |
- input == e.source && |
- offset == e.offset); |
+ Expect.throws(() { |
+ UTF8.decoder.convert(input); |
+ }, (e) => e is FormatException && input == e.source && offset == e.offset); |
} |
// Bad encoding, points to first bad byte. |