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

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

Issue 2566393003: Implement SearchEngine.searchMemberDeclarations() for the new driver. (Closed)
Patch Set: Created 4 years 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/analyzer/lib/src/dart/analysis/search.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/dart/analysis/search_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index 293c1dcd18fc961994390e3901841910f6113085..cfffe71eb3162b8f3282f967f3ebf9a6e349287a 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -71,6 +71,26 @@ class SearchTest extends BaseAnalysisDriverTest {
CompilationUnitElement testUnitElement;
LibraryElement testLibraryElement;
+ test_classMembers() async {
+ await _resolveTestUnit('''
+class A {
+ test() {}
+}
+class B {
+ int test = 1;
+ int testTwo = 2;
+ main() {
+ int test = 3;
+ }
+}
+''');
+ ClassElement a = _findElement('A');
+ ClassElement b = _findElement('B');
+ RegExp regExp = new RegExp(r'^test$');
+ expect(await driver.search.classMembers(regExp),
+ unorderedEquals([a.methods[0], b.fields[0]]));
+ }
+
test_searchReferences_ClassElement_definedInside() async {
await _resolveTestUnit('''
class A {};
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/search.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698