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

Unified Diff: tests/compiler/dart2js/semantic_visitor_test.dart

Issue 1238783003: Handle deferred access as pre-step in SemanticSendVisitor. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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: tests/compiler/dart2js/semantic_visitor_test.dart
diff --git a/tests/compiler/dart2js/semantic_visitor_test.dart b/tests/compiler/dart2js/semantic_visitor_test.dart
index 19c16947c7585c53cc26016e3113db9e1f4ac143..3361844fc1d798ea3cedf3773a7776b2482ecf70 100644
--- a/tests/compiler/dart2js/semantic_visitor_test.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test.dart
@@ -142,17 +142,19 @@ class Visit {
class Test {
final String codeByPrefix;
+ final bool isDeferred;
final String code;
final /*Visit | List<Visit>*/ expectedVisits;
final String cls;
final String method;
const Test(this.code, this.expectedVisits)
- : cls = null, method = 'm', codeByPrefix = null;
+ : cls = null, method = 'm', codeByPrefix = null, isDeferred = false;
const Test.clazz(this.code, this.expectedVisits,
{this.cls: 'C', this.method: 'm'})
- : codeByPrefix = null;
- const Test.prefix(this.codeByPrefix, this.code, this.expectedVisits)
+ : codeByPrefix = null, isDeferred = false;
+ const Test.prefix(this.codeByPrefix, this.code, this.expectedVisits,
+ {this.isDeferred: false})
: cls = null, method = 'm';
String toString() {
@@ -276,7 +278,11 @@ Future test(Set<VisitKind> unvisitedKinds,
if (test.codeByPrefix != null) {
String prefixFilename = 'pre$index.dart';
sourceFiles[prefixFilename] = test.codeByPrefix;
- testSource.writeln("import '$prefixFilename' as p;");
+ if (test.isDeferred) {
+ testSource.writeln("import '$prefixFilename' deferred as p;");
+ } else {
+ testSource.writeln("import '$prefixFilename' as p;");
+ }
}
String filename = 'lib$index.dart';
@@ -703,4 +709,6 @@ enum VisitKind {
VISIT_CONSTANT_GET,
VISIT_CONSTANT_INVOKE,
+
+ VISIT_DEFERRED_ACCESS,
}

Powered by Google App Engine
This is Rietveld 408576698