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

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

Issue 2983273002: Migrated test block 28 to Dart 2.0. (Closed)
Patch Set: Updated status file to fix failing test Created 3 years, 4 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 // Dart test for testing String.allMatches. 4 // Dart test for testing String.allMatches.
5 5
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 7
8 String str = "this is a string with hello here and hello there"; 8 String str = "this is a string with hello here and hello there";
9 9
10 main() { 10 main() {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 String p = "ass"; 102 String p = "ass";
103 String s = "assassin"; 103 String s = "assassin";
104 Expect.equals(2, p.allMatches(s).length); 104 Expect.equals(2, p.allMatches(s).length);
105 Expect.equals(2, p.allMatches(s, 0).length); 105 Expect.equals(2, p.allMatches(s, 0).length);
106 Expect.equals(1, p.allMatches(s, 1).length); 106 Expect.equals(1, p.allMatches(s, 1).length);
107 Expect.equals(0, p.allMatches(s, 4).length); 107 Expect.equals(0, p.allMatches(s, 4).length);
108 Expect.equals(0, p.allMatches(s, s.length).length); 108 Expect.equals(0, p.allMatches(s, s.length).length);
109 Expect.throws(() => p.allMatches(s, -1)); 109 Expect.throws(() => p.allMatches(s, -1));
110 Expect.throws(() => p.allMatches(s, s.length + 1)); 110 Expect.throws(() => p.allMatches(s, s.length + 1));
111 } 111 }
OLDNEW
« no previous file with comments | « tests/corelib_2/string_operations_with_null_test.dart ('k') | tests/corelib_2/string_replace_all_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698