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

Side by Side Diff: tests/corelib_2/string_codeunits_test.dart

Issue 2989473002: Migrated test block 27 to Dart 2.0. (Closed)
Patch Set: Addressed Bob's nits and fixed test failures Created 3 years, 5 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
OLDNEW
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 "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 main() { 7 main() {
8 test(String s) { 8 test(String s) {
9 List<int> units = s.codeUnits; 9 List<int> units = s.codeUnits;
10 List<int> expectedUnits = <int>[]; 10 List<int> expectedUnits = <int>[];
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 test(string); 71 test(string);
72 72
73 // Reading each unit of a surrogate pair works. 73 // Reading each unit of a surrogate pair works.
74 var r = "\u{10000}".codeUnits; 74 var r = "\u{10000}".codeUnits;
75 var it = r.iterator; 75 var it = r.iterator;
76 Expect.isTrue(it.moveNext()); 76 Expect.isTrue(it.moveNext());
77 Expect.equals(0xD800, it.current); 77 Expect.equals(0xD800, it.current);
78 Expect.isTrue(it.moveNext()); 78 Expect.isTrue(it.moveNext());
79 Expect.equals(0xDC00, it.current); 79 Expect.equals(0xDC00, it.current);
80 } 80 }
OLDNEW
« no previous file with comments | « tests/corelib_2/string_case_test.dart ('k') | tests/corelib_2/string_from_environment2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698