| 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 | 6 |
| 7 // TODO(ngeoffray): test String methods with null arguments. | |
| 8 class StringTest { | 7 class StringTest { |
| 9 | 8 |
| 10 static testMain() { | 9 static testMain() { |
| 11 testOutOfRange(); | 10 testOutOfRange(); |
| 12 testIllegalArgument(); | 11 testIllegalArgument(); |
| 13 testConcat(); | 12 testConcat(); |
| 14 testIndex(); | 13 testIndex(); |
| 15 testCodeUnitAt(); | 14 testCodeUnitAt(); |
| 16 testEquals(); | 15 testEquals(); |
| 17 testEndsWith(); | 16 testEndsWith(); |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 389 |
| 391 void testStringLength(int length, String str) { | 390 void testStringLength(int length, String str) { |
| 392 Expect.equals(length, str.length); | 391 Expect.equals(length, str.length); |
| 393 (length == 0 ? Expect.isTrue : Expect.isFalse)(str.isEmpty); | 392 (length == 0 ? Expect.isTrue : Expect.isFalse)(str.isEmpty); |
| 394 (length != 0 ? Expect.isTrue : Expect.isFalse)(str.isNotEmpty); | 393 (length != 0 ? Expect.isTrue : Expect.isFalse)(str.isNotEmpty); |
| 395 } | 394 } |
| 396 | 395 |
| 397 main() { | 396 main() { |
| 398 StringTest.testMain(); | 397 StringTest.testMain(); |
| 399 } | 398 } |
| OLD | NEW |