| Index: tests/language/src/CharEscapeVMTest.dart
|
| diff --git a/tests/language/src/CharEscapeVMTest.dart b/tests/language/src/CharEscapeVMTest.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fea0083ac2bbd9343012694cda705eec68c85397
|
| --- /dev/null
|
| +++ b/tests/language/src/CharEscapeVMTest.dart
|
| @@ -0,0 +1,36 @@
|
| +// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +// Dart test for reading escape sequences in string literals
|
| +// This test explicitly checks for handling for 4 byte unicode.
|
| +
|
| +class CharEscapeVMTest {
|
| + static testMain() {
|
| + var v10000 = "\u{10000}";
|
| + var v010000 = "\u{010000}";
|
| + Expect.equals(1, v10000.length);
|
| + Expect.equals(1, v010000.length);
|
| + Expect.equals("\u{10000}", new String.fromCharCodes([0x10000]));
|
| + Expect.equals("\u{010000}", new String.fromCharCodes([0x10000]));
|
| +
|
| +
|
| + var v1FFFF = "\u{1FFFF}";
|
| + var v01FFFF = "\u{01FFFF}";
|
| + Expect.equals(1, v1FFFF.length);
|
| + Expect.equals(1, v01FFFF.length);
|
| + Expect.equals("\u{1FFFF}", new String.fromCharCodes([0x1FFFF]));
|
| + Expect.equals("\u{01FFFF}", new String.fromCharCodes([0x1FFFF]));
|
| +
|
| + var v105555 = "\u{105555}";
|
| + Expect.equals(1, v105555.length);
|
| + Expect.equals("\u{105555}", new String.fromCharCodes([0x105555]));
|
| +
|
| + var v10FFFF = "\u{10FFFF}";
|
| + Expect.equals(1, v10FFFF.length);
|
| + Expect.equals("\u{10FFFF}", new String.fromCharCodes([0x10FFFF]));
|
| + }
|
| +}
|
| +
|
| +main() {
|
| + CharEscapeVMTest.testMain();
|
| +}
|
|
|