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

Unified Diff: pkg/analyzer/test/src/dart/analysis/index_test.dart

Issue 2522503004: Start implementing search support in AnalysisDriver. (Closed)
Patch Set: Created 4 years, 1 month 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/analyzer/test/src/dart/analysis/index_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/index_test.dart b/pkg/analyzer/test/src/dart/analysis/index_test.dart
index 11174a2d7a4f6936b425506f109265bd1122a157..8c544c72d7a8789bb03be97d7edffb596aad6771 100644
--- a/pkg/analyzer/test/src/dart/analysis/index_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/index_test.dart
@@ -82,33 +82,6 @@ class IndexTest extends BaseAnalysisDriverTest {
return findChildElement(testUnitElement, name, kind);
}
- int findOffset(String search) {
- int offset = testCode.indexOf(search);
- expect(offset, isNonNegative, reason: "Not found '$search' in\n$testCode");
- return offset;
- }
-
- int getLeadingIdentifierLength(String search) {
- int length = 0;
- while (length < search.length) {
- int c = search.codeUnitAt(length);
- if (c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0)) {
- length++;
- continue;
- }
- if (c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0)) {
- length++;
- continue;
- }
- if (c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0)) {
- length++;
- continue;
- }
- break;
- }
- return length;
- }
-
CompilationUnitElement importedUnit({int index: 0}) {
List<ImportElement> imports = testLibraryElement.imports;
return imports[index].importedLibrary.definingCompilationUnit;

Powered by Google App Engine
This is Rietveld 408576698