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

Unified Diff: pkg/analysis_server/test/services/correction/strings_test.dart

Issue 1394933003: Move getCamelWords() to the strings.dart file. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « pkg/analysis_server/test/services/correction/name_suggestion_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/strings_test.dart
diff --git a/pkg/analysis_server/test/services/correction/strings_test.dart b/pkg/analysis_server/test/services/correction/strings_test.dart
index 2e30c37e2e4ca2b4b0ac6b6751023e75728b7660..3fb37fbffbd0deb956868bbd36c3765e2b32cbbf 100644
--- a/pkg/analysis_server/test/services/correction/strings_test.dart
+++ b/pkg/analysis_server/test/services/correction/strings_test.dart
@@ -33,6 +33,15 @@ class StringsTest {
expect(compareStrings('b', 'a'), 1);
}
+ void test_countMatches() {
+ expect(countMatches(null, null), 0);
+ expect(countMatches('abc', null), 0);
+ expect(countMatches(null, 'abc'), 0);
+ expect(countMatches('ababa', 'a'), 3);
+ expect(countMatches('ababa', 'ab'), 2);
+ expect(countMatches('aaabaa', 'aa'), 2);
+ }
+
void test_findCommonOverlap() {
expect(findCommonOverlap('', 'abcd'), 0);
expect(findCommonOverlap('abc', 'abcd'), 3);
@@ -54,6 +63,13 @@ class StringsTest {
expect(findCommonSuffix('123', 'xyz123'), 3);
}
+ void test_getCamelWords() {
+ expect(getCamelWords(null), []);
+ expect(getCamelWords(''), []);
+ expect(getCamelWords('getCamelWords'), ['get', 'Camel', 'Words']);
+ expect(getCamelWords('getHTMLText'), ['get', 'HTML', 'Text']);
+ }
+
void test_isBlank() {
expect(isBlank(null), isTrue);
expect(isBlank(''), isTrue);
« no previous file with comments | « pkg/analysis_server/test/services/correction/name_suggestion_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698