Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1153)

Unified Diff: pkg/analysis_services/test/correction/levenshtein_test.dart

Issue 484733003: Import analysis_services.dart into analysis_server.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
- }
-}
« no previous file with comments | « pkg/analysis_services/test/correction/fix_test.dart ('k') | pkg/analysis_services/test/correction/name_suggestion_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698