Index: pkg/analysis_services/test/correction/levenshtein_test.dart |
diff --git a/pkg/analysis_services/test/correction/levenshtein_test.dart b/pkg/analysis_services/test/correction/levenshtein_test.dart |
deleted file mode 100644 |
index 4e40bd7800378418e1a7e9124af6c84e7b9cb981..0000000000000000000000000000000000000000 |
--- a/pkg/analysis_services/test/correction/levenshtein_test.dart |
+++ /dev/null |
@@ -1,68 +0,0 @@ |
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
- |
-library test.services.correction.levenshtein; |
- |
-import 'package:analysis_services/src/correction/levenshtein.dart'; |
-import 'package:analysis_testing/reflective_tests.dart'; |
-import 'package:unittest/unittest.dart'; |
- |
- |
-main() { |
- groupSep = ' | '; |
- runReflectiveTests(LevenshteinTest); |
-} |
- |
-@ReflectiveTestCase() |
-class LevenshteinTest { |
- void test_different_caseInsensitive() { |
- expect(levenshtein('Saturday', 'sunday', 5, caseSensitive: false), 3); |
- expect(levenshtein('SaturDay', 'sunday', 5, caseSensitive: false), 3); |
- } |
- |
- void test_different_onThreshold() { |
- expect(levenshtein('', 'abcde', 5), 5); |
- expect(levenshtein('abcde', '', 5), 5); |
- } |
- |
- void test_different_overThreshold() { |
- expect(levenshtein('', 'abcde', 2), LEVENSHTEIN_MAX); |
- expect(levenshtein('abcde', '', 2), LEVENSHTEIN_MAX); |
- } |
- |
- void test_different_overThreshold_length() { |
- expect(levenshtein('a', 'abcdefgh', 5), LEVENSHTEIN_MAX); |
- expect(levenshtein('abcdefgh', 'a', 5), LEVENSHTEIN_MAX); |
- } |
- |
- void test_different_underThreshold() { |
- expect(levenshtein('String', 'Stirng', 5), 2); |
- expect(levenshtein('kitten', 'sitting', 5), 3); |
- expect(levenshtein('Saturday', 'Sunday', 5), 3); |
- } |
- |
- void test_negativeThreshold() { |
- expect(() { |
- levenshtein('', '', -5); |
- }, throws); |
- } |
- |
- void test_null() { |
- expect(() { |
- levenshtein('', null, 5); |
- }, throws); |
- expect(() { |
- levenshtein(null, '', 5); |
- }, throws); |
- } |
- |
- void test_same() { |
- expect(levenshtein('', '', 5), 0); |
- expect(levenshtein('test', 'test', 5), 0); |
- } |
- |
- void test_same_caseInsensitive() { |
- expect(levenshtein('test', 'Test', 5, caseSensitive: false), 0); |
- } |
-} |