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

Side by Side Diff: tests/corelib/string_replace_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_dollar_test.dart ('k') | tests/corelib/string_runes_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 class StringReplaceTest { 7 class StringReplaceTest {
6 static testMain() { 8 static testMain() {
7 Expect.equals( 9 Expect.equals(
8 "AtoBtoCDtoE", "AfromBtoCDtoE".replaceFirst("from", "to")); 10 "AtoBtoCDtoE", "AfromBtoCDtoE".replaceFirst("from", "to"));
9 11
10 // Test with the replaced string at the begining. 12 // Test with the replaced string at the begining.
11 Expect.equals( 13 Expect.equals(
12 "toABtoCDtoE", "fromABtoCDtoE".replaceFirst("from", "to")); 14 "toABtoCDtoE", "fromABtoCDtoE".replaceFirst("from", "to"));
13 15
14 // Test with the replaced string at the end. 16 // Test with the replaced string at the end.
(...skipping 24 matching lines...) Expand all
39 Expect.equals("to", "".replaceFirst("", "to")); 41 Expect.equals("to", "".replaceFirst("", "to"));
40 42
41 // Test replacing the empty string. 43 // Test replacing the empty string.
42 Expect.equals("toAtoBtoCto", "AtoBtoCto".replaceFirst("", "to")); 44 Expect.equals("toAtoBtoCto", "AtoBtoCto".replaceFirst("", "to"));
43 } 45 }
44 } 46 }
45 47
46 main() { 48 main() {
47 StringReplaceTest.testMain(); 49 StringReplaceTest.testMain();
48 } 50 }
OLDNEW
« no previous file with comments | « tests/corelib/string_replace_dollar_test.dart ('k') | tests/corelib/string_runes_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698