| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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:convert"; | 6 import "dart:convert"; |
| 7 import "dart:io"; | 7 import "dart:io"; |
| 8 import "dart:isolate"; | 8 import "dart:isolate"; |
| 9 import "dart:utf"; | |
| 10 | 9 |
| 11 import "package:expect/expect.dart"; | 10 import "package:expect/expect.dart"; |
| 12 | 11 |
| 12 const UNICODE_REPLACEMENT_CHARACTER_CODEPOINT = 0xFFFD; |
| 13 |
| 13 void main() { | 14 void main() { |
| 14 testUtf8(); | 15 testUtf8(); |
| 15 testLatin1(); | 16 testLatin1(); |
| 16 testAscii(); | 17 testAscii(); |
| 17 testReadLine1(); | 18 testReadLine1(); |
| 18 testReadLine2(); | 19 testReadLine2(); |
| 19 testErrorHandler(); | 20 testErrorHandler(); |
| 20 testLatin1EncoderError(); | 21 testLatin1EncoderError(); |
| 21 } | 22 } |
| 22 | 23 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 .transform(new StringEncoder(Encoding.ISO_8859_1)); | 192 .transform(new StringEncoder(Encoding.ISO_8859_1)); |
| 192 stream.listen( | 193 stream.listen( |
| 193 (s) { | 194 (s) { |
| 194 Expect.fail("data not expected"); | 195 Expect.fail("data not expected"); |
| 195 }, | 196 }, |
| 196 onError: (error) { | 197 onError: (error) { |
| 197 Expect.isTrue(error is FormatException); | 198 Expect.isTrue(error is FormatException); |
| 198 }); | 199 }); |
| 199 | 200 |
| 200 } | 201 } |
| OLD | NEW |