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

Unified Diff: pkg/analyzer/test/generated/all_the_rest_test.dart

Issue 1842433002: When summarize AST, include local variables in loops and try-catch. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/all_the_rest_test.dart
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index e7963a5b40b8f59d87d143433ae2259c2f0e2246..83b7125b8923de05c9a6764635dd09822bfc0287 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -596,11 +596,13 @@ class C {
String stackParameterName = "s";
CatchClause clause =
AstFactory.catchClause2(exceptionParameterName, stackParameterName);
+ _setNodeSourceRange(clause, 100, 110);
clause.accept(builder);
List<LocalVariableElement> variables = holder.localVariables;
expect(variables, hasLength(2));
- VariableElement exceptionVariable = variables[0];
+
+ LocalVariableElement exceptionVariable = variables[0];
expect(exceptionVariable, isNotNull);
expect(exceptionVariable.name, exceptionParameterName);
expect(exceptionVariable.hasImplicitType, isTrue);
@@ -608,13 +610,16 @@ class C {
expect(exceptionVariable.isConst, isFalse);
expect(exceptionVariable.isFinal, isFalse);
expect(exceptionVariable.initializer, isNull);
- VariableElement stackVariable = variables[1];
+ _assertVisibleRange(exceptionVariable, 100, 110);
+
+ LocalVariableElement stackVariable = variables[1];
expect(stackVariable, isNotNull);
expect(stackVariable.name, stackParameterName);
expect(stackVariable.isSynthetic, isFalse);
expect(stackVariable.isConst, isFalse);
expect(stackVariable.isFinal, isFalse);
expect(stackVariable.initializer, isNull);
+ _assertVisibleRange(stackVariable, 100, 110);
}
void test_visitCatchClause_withType() {
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698