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

Unified Diff: pkg/analysis_testing/lib/abstract_single_unit.dart

Issue 458063002: Initial work on refactorings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments 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_testing/lib/abstract_single_unit.dart
diff --git a/pkg/analysis_testing/lib/abstract_single_unit.dart b/pkg/analysis_testing/lib/abstract_single_unit.dart
index 85629ac502ba932e2a9e3786bd91071c6c5fecf4..7930d09172bc8f57502712c7292e00510638c280 100644
--- a/pkg/analysis_testing/lib/abstract_single_unit.dart
+++ b/pkg/analysis_testing/lib/abstract_single_unit.dart
@@ -32,6 +32,13 @@ class AbstractSingleUnitTest extends AbstractContextTest {
return findChildElement(testUnitElement, name, kind);
}
+ /**
+ * Returns the [SimpleIdentifier] at the given search pattern.
+ */
+ SimpleIdentifier findIdentifier(String search) {
+ return findNodeAtString(search, (node) => node is SimpleIdentifier);
+ }
+
AstNode findNodeAtOffset(int offset, [Predicate<AstNode> predicate]) {
AstNode result = new NodeLocator.con1(offset).searchWithin(testUnit);
if (result != null && predicate != null) {
« pkg/analysis_services/lib/correction/status.dart ('K') | « pkg/analysis_services/test/test_all.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698