| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library test.services.correction.diff; | |
| 6 | |
| 7 import 'package:analysis_server/src/services/correction/diff.dart'; | |
| 8 import 'package:unittest/unittest.dart'; | |
| 9 | |
| 10 import '../../reflective_tests.dart'; | |
| 11 | |
| 12 | |
| 13 main() { | |
| 14 groupSep = ' | '; | |
| 15 runReflectiveTests(DiffTest); | |
| 16 } | |
| 17 | |
| 18 @ReflectiveTestCase() | |
| 19 class DiffTest { | |
| 20 void test_findCommonPrefix() { | |
| 21 expect(findCommonPrefix('abc', 'xyz'), 0); | |
| 22 expect(findCommonPrefix('1234abcdef', '1234xyz'), 4); | |
| 23 expect(findCommonPrefix('123', '123xyz'), 3); | |
| 24 } | |
| 25 | |
| 26 void test_findCommonSuffix() { | |
| 27 expect(findCommonSuffix('abc', 'xyz'), 0); | |
| 28 expect(findCommonSuffix('abcdef1234', 'xyz1234'), 4); | |
| 29 expect(findCommonSuffix('123', 'xyz123'), 3); | |
| 30 } | |
| 31 } | |
| OLD | NEW |