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

Unified Diff: pkg/analyzer/test/src/dart/ast/utilities_test.dart

Issue 2683543006: Make some parser test helper methods non-static. (Closed)
Patch Set: Created 3 years, 10 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/analyzer/test/src/dart/analysis/referenced_names_test.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/ast/utilities_test.dart
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index cb3652e456085701d01a708613f6829cc9460a5e..b818e5d2a44e1fe63c15274bac8e4b52effdde4d 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -370,7 +370,7 @@ class NodeLocator2Test extends ParserTestCase {
void test_onlyStartOffset() {
String code = ' int vv; ';
// 012345678
- CompilationUnit unit = ParserTestCase.parseCompilationUnit(code);
+ CompilationUnit unit = parseCompilationUnit(code);
TopLevelVariableDeclaration declaration = unit.declarations[0];
VariableDeclarationList variableList = declaration.variables;
Identifier typeName = (variableList.type as TypeName).name;
@@ -391,7 +391,7 @@ class NodeLocator2Test extends ParserTestCase {
void test_startEndOffset() {
String code = ' int vv; ';
// 012345678
- CompilationUnit unit = ParserTestCase.parseCompilationUnit(code);
+ CompilationUnit unit = parseCompilationUnit(code);
TopLevelVariableDeclaration declaration = unit.declarations[0];
VariableDeclarationList variableList = declaration.variables;
Identifier typeName = (variableList.type as TypeName).name;
@@ -412,8 +412,7 @@ class NodeLocator2Test extends ParserTestCase {
@reflectiveTest
class NodeLocatorTest extends ParserTestCase {
void test_range() {
- CompilationUnit unit =
- ParserTestCase.parseCompilationUnit("library myLib;");
+ CompilationUnit unit = parseCompilationUnit("library myLib;");
_assertLocate(
unit, 4, 10, (node) => node is LibraryDirective, LibraryDirective);
}
@@ -424,14 +423,13 @@ class NodeLocatorTest extends ParserTestCase {
}
void test_searchWithin_offset() {
- CompilationUnit unit =
- ParserTestCase.parseCompilationUnit("library myLib;");
+ CompilationUnit unit = parseCompilationUnit("library myLib;");
_assertLocate(
unit, 10, 10, (node) => node is SimpleIdentifier, SimpleIdentifier);
}
void test_searchWithin_offsetAfterNode() {
- CompilationUnit unit = ParserTestCase.parseCompilationUnit(r'''
+ CompilationUnit unit = parseCompilationUnit(r'''
class A {}
class B {}''');
NodeLocator locator = new NodeLocator(1024, 1024);
@@ -440,7 +438,7 @@ class B {}''');
}
void test_searchWithin_offsetBeforeNode() {
- CompilationUnit unit = ParserTestCase.parseCompilationUnit(r'''
+ CompilationUnit unit = parseCompilationUnit(r'''
class A {}
class B {}''');
NodeLocator locator = new NodeLocator(0, 0);
« no previous file with comments | « pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698