| OLD | NEW |
| 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 class StringReplaceTest { | 5 class StringReplaceTest { |
| 6 static testMain() { | 6 static testMain() { |
| 7 Expect.equals( | 7 Expect.equals( |
| 8 "AtoBtoCDtoE", "AfromBtoCDtoE".replaceFirst("from", "to")); | 8 "AtoBtoCDtoE", "AfromBtoCDtoE".replaceFirst("from", "to")); |
| 9 | 9 |
| 10 // Test with the replaced string at the begining. | 10 // Test with the replaced string at the begining. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 Expect.equals("to", "".replaceFirst("", "to")); | 39 Expect.equals("to", "".replaceFirst("", "to")); |
| 40 | 40 |
| 41 // Test replacing the empty string. | 41 // Test replacing the empty string. |
| 42 Expect.equals("toAtoBtoCto", "AtoBtoCto".replaceFirst("", "to")); | 42 Expect.equals("toAtoBtoCto", "AtoBtoCto".replaceFirst("", "to")); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 main() { | 46 main() { |
| 47 StringReplaceTest.testMain(); | 47 StringReplaceTest.testMain(); |
| 48 } | 48 } |
| OLD | NEW |