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

Side by Side Diff: tests/corelib/string_runes_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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
« no previous file with comments | « tests/corelib/string_replace_test.dart ('k') | tests/corelib/string_slice_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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";
6
7 main() { 5 main() {
8 test(String s, List<int> expectedRunes) { 6 test(String s, List<int> expectedRunes) {
9 Runes runes = s.runes; 7 Runes runes = s.runes;
10 Expect.identical(s, runes.string); 8 Expect.identical(s, runes.string);
11 9
12 // for-in 10 // for-in
13 var res = []; 11 var res = [];
14 for (int rune in runes) { 12 for (int rune in runes) {
15 res.add(rune); 13 res.add(rune);
16 } 14 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Setting position in the middle of a surrogate pair is not allowed. 69 // Setting position in the middle of a surrogate pair is not allowed.
72 var r = new Runes("\u{10000}"); 70 var r = new Runes("\u{10000}");
73 var it = r.iterator; 71 var it = r.iterator;
74 it.moveNext(); 72 it.moveNext();
75 Expect.equals(0x10000, it.current); 73 Expect.equals(0x10000, it.current);
76 74
77 // Setting rawIndex inside surrogate pair. 75 // Setting rawIndex inside surrogate pair.
78 Expect.throws(() { it.rawIndex = 1; }, (e) => e is Error); 76 Expect.throws(() { it.rawIndex = 1; }, (e) => e is Error);
79 Expect.throws(() { it.reset(1); }, (e) => e is Error); 77 Expect.throws(() { it.reset(1); }, (e) => e is Error);
80 } 78 }
OLDNEW
« no previous file with comments | « tests/corelib/string_replace_test.dart ('k') | tests/corelib/string_slice_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698