| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library test.services.correction.strings; | 8 library test.services.correction.strings; |
| 9 | 9 |
| 10 import 'package:analysis_services/src/correction/strings.dart'; | 10 import 'package:analysis_services/src/correction/strings.dart'; |
| 11 import 'package:analysis_testing/reflective_tests.dart'; | 11 import 'package:analysis_testing/reflective_tests.dart'; |
| 12 import 'package:unittest/unittest.dart' hide isEmpty; | 12 import 'package:unittest/unittest.dart' hide isEmpty; |
| 13 | 13 |
| 14 | 14 |
| 15 | 15 |
| 16 main() { | 16 main() { |
| 17 groupSep = ' | '; | 17 groupSep = ' | '; |
| 18 group('strings', () { | 18 runReflectiveTests(StringsTest); |
| 19 runReflectiveTests(StringsTest); | |
| 20 }); | |
| 21 } | 19 } |
| 22 | 20 |
| 23 | 21 |
| 24 @ReflectiveTestCase() | 22 @ReflectiveTestCase() |
| 25 class StringsTest { | 23 class StringsTest { |
| 26 void test_capitalize() { | 24 void test_capitalize() { |
| 27 expect(capitalize(null), null); | 25 expect(capitalize(null), null); |
| 28 expect(capitalize(''), ''); | 26 expect(capitalize(''), ''); |
| 29 expect(capitalize('a'), 'A'); | 27 expect(capitalize('a'), 'A'); |
| 30 expect(capitalize('abc'), 'Abc'); | 28 expect(capitalize('abc'), 'Abc'); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 expect(removeStart('abcTest', 'abc'), 'Test'); | 98 expect(removeStart('abcTest', 'abc'), 'Test'); |
| 101 expect(removeStart('my abcTest', 'abc'), 'my abcTest'); | 99 expect(removeStart('my abcTest', 'abc'), 'my abcTest'); |
| 102 } | 100 } |
| 103 | 101 |
| 104 void test_repeat() { | 102 void test_repeat() { |
| 105 expect(repeat('x', 0), ''); | 103 expect(repeat('x', 0), ''); |
| 106 expect(repeat('x', 5), 'xxxxx'); | 104 expect(repeat('x', 5), 'xxxxx'); |
| 107 expect(repeat('abc', 3), 'abcabcabc'); | 105 expect(repeat('abc', 3), 'abcabcabc'); |
| 108 } | 106 } |
| 109 } | 107 } |
| OLD | NEW |