Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: tests/language/src/CharEscapeVMTest.dart

Issue 9149005: split out vm-specific tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: keeping test closer to original Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4 // Dart test for reading escape sequences in string literals
5 // This test explicitly checks for handling for 4 byte unicode.
6
7 class CharEscapeVMTest {
8 static testMain() {
9 var v10000 = "\u{10000}";
10 var v010000 = "\u{010000}";
11 Expect.equals(1, v10000.length);
12 Expect.equals(1, v010000.length);
13 Expect.equals("\u{10000}", new String.fromCharCodes([0x10000]));
14 Expect.equals("\u{010000}", new String.fromCharCodes([0x10000]));
15
16
17 var v1FFFF = "\u{1FFFF}";
18 var v01FFFF = "\u{01FFFF}";
19 Expect.equals(1, v1FFFF.length);
20 Expect.equals(1, v01FFFF.length);
21 Expect.equals("\u{1FFFF}", new String.fromCharCodes([0x1FFFF]));
22 Expect.equals("\u{01FFFF}", new String.fromCharCodes([0x1FFFF]));
23
24 var v105555 = "\u{105555}";
25 Expect.equals(1, v105555.length);
26 Expect.equals("\u{105555}", new String.fromCharCodes([0x105555]));
27
28 var v10FFFF = "\u{10FFFF}";
29 Expect.equals(1, v10FFFF.length);
30 Expect.equals("\u{10FFFF}", new String.fromCharCodes([0x10FFFF]));
31 }
32 }
33
34 main() {
35 CharEscapeVMTest.testMain();
36 }
OLDNEW
« tests/language/src/BitOperationsTest.dart ('K') | « tests/language/src/CharEscapeTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698