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('../../../../utils/utf8/utf8.dart'); | 5 #import('../../../../lib/utf8/utf8.dart'); |
6 #import('../../../leg/scanner/scannerlib.dart'); | 6 #import('../../../leg/scanner/scannerlib.dart'); |
7 #import('../../../leg/scanner/scanner_implementation.dart'); | 7 #import('../../../leg/scanner/scanner_implementation.dart'); |
8 #import('../../../leg/util/characters.dart'); | 8 #import('../../../leg/util/characters.dart'); |
9 #source('../../../leg/scanner/byte_strings.dart'); | 9 #source('../../../leg/scanner/byte_strings.dart'); |
10 #source('../../../leg/scanner/byte_array_scanner.dart'); | 10 #source('../../../leg/scanner/byte_array_scanner.dart'); |
11 | 11 |
12 Token scan(List<int> bytes) => new ByteArrayScanner(bytes).tokenize(); | 12 Token scan(List<int> bytes) => new ByteArrayScanner(bytes).tokenize(); |
13 | 13 |
14 bool isRunningOnJavaScript() => 1 === 1.0; | 14 bool isRunningOnJavaScript() => 1 === 1.0; |
15 | 15 |
(...skipping 29 matching lines...) Expand all Loading... |
45 | 45 |
46 if (!isRunningOnJavaScript()) { | 46 if (!isRunningOnJavaScript()) { |
47 // DESERET CAPITAL LETTER BEE, unicode 0x10412(0xD801+0xDC12) | 47 // DESERET CAPITAL LETTER BEE, unicode 0x10412(0xD801+0xDC12) |
48 // UTF-8: F0 90 90 92 | 48 // UTF-8: F0 90 90 92 |
49 token = scan([0xf0, 0x90, 0x90, 0x92, $EOF]); | 49 token = scan([0xf0, 0x90, 0x90, 0x92, $EOF]); |
50 Expect.stringEquals("𐐒", token.value.toString()); | 50 Expect.stringEquals("𐐒", token.value.toString()); |
51 } else { | 51 } else { |
52 print('Skipping non-BMP character test'); | 52 print('Skipping non-BMP character test'); |
53 } | 53 } |
54 } | 54 } |
OLD | NEW |