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

Side by Side Diff: pkg/analysis_services/test/correction/levenshtein_test.dart

Issue 414273002: New 'use similar' fixes. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 // 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.
7
8 library test.services.correction.levenshtein;
9
10 import 'package:analysis_services/src/correction/levenshtein.dart';
11 import 'package:unittest/unittest.dart';
12
13
14 main() {
15 groupSep = ' | ';
16 test('getLevenshteinDistance', () {
17 expect(getLevenshteinDistance('test', 'test'), equals(0));
18 expect(getLevenshteinDistance('String', 'Stirng'), equals(2));
19 expect(getLevenshteinDistance('', ''), equals(0));
20 expect(getLevenshteinDistance('kitten', 'sitting'), equals(3));
21 expect(getLevenshteinDistance('Saturday', 'Sunday'), equals(3));
22 expect(
23 getLevenshteinDistance('Saturday', 'sunday', caseSensitive: false),
24 equals(3));
25 expect(
26 getLevenshteinDistance('SaturDay', 'sunday', caseSensitive: false),
27 equals(3));
28 expect(getLevenshteinDistance('', 'fewfe'), equals(5));
29 expect(getLevenshteinDistance('fewfe', ''), equals(5));
30 });
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698