| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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:io"); |
| 6 |
| 5 void testUtf8() { | 7 void testUtf8() { |
| 6 List<int> data = [0x01, | 8 List<int> data = [0x01, |
| 7 0x7f, | 9 0x7f, |
| 8 0xc2, 0x80, | 10 0xc2, 0x80, |
| 9 0xdf, 0xbf, | 11 0xdf, 0xbf, |
| 10 0xe0, 0xa0, 0x80, | 12 0xe0, 0xa0, 0x80, |
| 11 0xef, 0xbf, 0xbf]; | 13 0xef, 0xbf, 0xbf]; |
| 12 InputStream s = new ListInputStream(data); | 14 InputStream s = new ListInputStream(data); |
| 13 StringInputStream stream = new StringInputStream(s); | 15 StringInputStream stream = new StringInputStream(s); |
| 14 void stringData() { | 16 void stringData() { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 s.write("Line1\nLine2\r\nLine3\rLi".charCodes()); | 149 s.write("Line1\nLine2\r\nLine3\rLi".charCodes()); |
| 148 } | 150 } |
| 149 | 151 |
| 150 main() { | 152 main() { |
| 151 testUtf8(); | 153 testUtf8(); |
| 152 testLatin1(); | 154 testLatin1(); |
| 153 testAscii(); | 155 testAscii(); |
| 154 testReadLine1(); | 156 testReadLine1(); |
| 155 testReadLine2(); | 157 testReadLine2(); |
| 156 } | 158 } |
| OLD | NEW |