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

Side by Side Diff: tests/corelib/string_pattern_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_fromcharcode_test.dart ('k') | tests/corelib/string_replace_all_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 // Dart test for testing String.allMatches. 4 // Dart test for testing String.allMatches.
5 5
6 import "package:expect/expect.dart";
7
8 String str = "this is a string with hello here and hello there"; 6 String str = "this is a string with hello here and hello there";
9 7
10 main() { 8 main() {
11 testNoMatch(); 9 testNoMatch();
12 testOneMatch(); 10 testOneMatch();
13 testTwoMatches(); 11 testTwoMatches();
14 testEmptyPattern(); 12 testEmptyPattern();
15 testEmptyString(); 13 testEmptyString();
16 testEmptyPatternAndString(); 14 testEmptyPatternAndString();
17 } 15 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 Iterable<Match> matches = pattern.allMatches(str); 68 Iterable<Match> matches = pattern.allMatches(str);
71 Expect.isFalse(matches.iterator.moveNext()); 69 Expect.isFalse(matches.iterator.moveNext());
72 } 70 }
73 71
74 testEmptyPatternAndString() { 72 testEmptyPatternAndString() {
75 String pattern = ""; 73 String pattern = "";
76 String str = ""; 74 String str = "";
77 Iterable<Match> matches = pattern.allMatches(str); 75 Iterable<Match> matches = pattern.allMatches(str);
78 Expect.isTrue(matches.iterator.moveNext()); 76 Expect.isTrue(matches.iterator.moveNext());
79 } 77 }
OLDNEW
« no previous file with comments | « tests/corelib/string_fromcharcode_test.dart ('k') | tests/corelib/string_replace_all_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698