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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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
5 main() { 7 main() {
6 test(String s, List<int> expectedRunes) { 8 test(String s, List<int> expectedRunes) {
7 Runes runes = s.runes; 9 Runes runes = s.runes;
8 Expect.identical(s, runes.string); 10 Expect.identical(s, runes.string);
9 11
10 // for-in 12 // for-in
11 var res = []; 13 var res = [];
12 for (int rune in runes) { 14 for (int rune in runes) {
13 res.add(rune); 15 res.add(rune);
14 } 16 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // Setting position in the middle of a surrogate pair is not allowed. 71 // Setting position in the middle of a surrogate pair is not allowed.
70 var r = new Runes("\u{10000}"); 72 var r = new Runes("\u{10000}");
71 var it = r.iterator; 73 var it = r.iterator;
72 it.moveNext(); 74 it.moveNext();
73 Expect.equals(0x10000, it.current); 75 Expect.equals(0x10000, it.current);
74 76
75 // Setting rawIndex inside surrogate pair. 77 // Setting rawIndex inside surrogate pair.
76 Expect.throws(() { it.rawIndex = 1; }, (e) => e is Error); 78 Expect.throws(() { it.rawIndex = 1; }, (e) => e is Error);
77 Expect.throws(() { it.reset(1); }, (e) => e is Error); 79 Expect.throws(() { it.reset(1); }, (e) => e is Error);
78 } 80 }
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