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

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

Issue 11280034: Move more methods to the new interceptor scheme (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | no next file » | 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 // TODO(ngeoffray): test String methods with null arguments. 5 // TODO(ngeoffray): test String methods with null arguments.
6 class StringTest { 6 class StringTest {
7 7
8 static testMain() { 8 static testMain() {
9 testOutOfRange(); 9 testOutOfRange();
10 testIllegalArgument(); 10 testIllegalArgument();
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 Expect.equals(4, "strstr".lastIndexOf("t", 5)); 186 Expect.equals(4, "strstr".lastIndexOf("t", 5));
187 Expect.equals(4, "strstr".lastIndexOf("tr", 5)); 187 Expect.equals(4, "strstr".lastIndexOf("tr", 5));
188 Expect.equals(3, "strstr".lastIndexOf("str", 5)); 188 Expect.equals(3, "strstr".lastIndexOf("str", 5));
189 Expect.equals(3, "strstr".lastIndexOf("str", 5)); 189 Expect.equals(3, "strstr".lastIndexOf("str", 5));
190 Expect.equals(3, "strstr".lastIndexOf("str", 5)); 190 Expect.equals(3, "strstr".lastIndexOf("str", 5));
191 Expect.equals(3, "strstr".lastIndexOf("st", 5)); 191 Expect.equals(3, "strstr".lastIndexOf("st", 5));
192 Expect.equals(3, "strstr".lastIndexOf("s", 5)); 192 Expect.equals(3, "strstr".lastIndexOf("s", 5));
193 Expect.equals(5, "strstr".lastIndexOf("r", 5)); 193 Expect.equals(5, "strstr".lastIndexOf("r", 5));
194 Expect.equals(2, "strstr".lastIndexOf("r", 4)); 194 Expect.equals(2, "strstr".lastIndexOf("r", 4));
195 Expect.equals(2, "strstr".lastIndexOf("r", 3)); 195 Expect.equals(2, "strstr".lastIndexOf("r", 3));
196 Expect.equals(5, "strstr".lastIndexOf("r"));
197 Expect.equals(5, "strstr".lastIndexOf("r"), null);
196 198
197 String str = "hello"; 199 String str = "hello";
198 for (int i = 0; i < 10; i++) { 200 for (int i = 0; i < 10; i++) {
199 int result = str.lastIndexOf("", i); 201 int result = str.lastIndexOf("", i);
200 if (i > str.length) { 202 if (i > str.length) {
201 Expect.equals(str.length, result); 203 Expect.equals(str.length, result);
202 } else { 204 } else {
203 Expect.equals(i, result); 205 Expect.equals(i, result);
204 } 206 }
205 } 207 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 294 }
293 test("abc"); 295 test("abc");
294 test(""); 296 test("");
295 test(" "); 297 test(" ");
296 } 298 }
297 } 299 }
298 300
299 main() { 301 main() {
300 StringTest.testMain(); 302 StringTest.testMain();
301 } 303 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698