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

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

Issue 1130773002: Differentiate between unresolved class and constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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/compiler/lib/src/resolution/send_structure.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c227fa83e0b4cd270dc2f2a81d6706089b7315bb..ee651d595786aafe7ac83eb9838038404a2efd71 100644
--- a/tests/compiler/dart2js/semantic_visitor_test.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test.dart
@@ -2268,16 +2268,14 @@ const Map<String, List<Test>> SEND_TESTS = const {
m() => new Class.unresolved(true, 42);
''',
const Visit(
- VisitKind.ERROR_UNRESOLVED_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_CONSTRUCTOR_INVOKE,
arguments: '(true,42)')),
const Test(
'''
m() => new Unresolved(true, 42);
''',
const Visit(
- // TODO(johnniwinther): Update this to
- // `VisitKind.ERROR_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE`.
- VisitKind.ERROR_UNRESOLVED_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE,
arguments: '(true,42)')),
const Test(
'''
@@ -2285,7 +2283,7 @@ const Map<String, List<Test>> SEND_TESTS = const {
m() => new AbstractClass();
''',
const Visit(
- VisitKind.ERROR_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE,
element: 'generative_constructor(AbstractClass#)',
type: 'AbstractClass',
arguments: '()',
@@ -2298,11 +2296,11 @@ const Map<String, List<Test>> SEND_TESTS = const {
m() => new Class(true, 42);
''',
const Visit(
- VisitKind.ERROR_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
element: 'function(Class#)',
arguments: '(true,42)',
type: 'Class',
- selector: 'Selector(call, , arity=2)')),
+ selector: 'CallStructure(arity=2)')),
const Test(
'''
class Class {
@@ -2311,11 +2309,11 @@ const Map<String, List<Test>> SEND_TESTS = const {
m() => new Class(true, 42);
''',
const Visit(
- VisitKind.ERROR_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
element: 'function(Class#)',
arguments: '(true,42)',
type: 'Class',
- selector: 'Selector(call, , arity=2)')),
+ selector: 'CallStructure(arity=2)')),
const Test(
'''
class Class {
@@ -2325,11 +2323,11 @@ const Map<String, List<Test>> SEND_TESTS = const {
m() => new Class(true, 42);
''',
const Visit(
- VisitKind.ERROR_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
element: 'function(Class#)',
arguments: '(true,42)',
type: 'Class',
- selector: 'Selector(call, , arity=2)')),
+ selector: 'CallStructure(arity=2)')),
const Test(
'''
abstract class AbstractClass {
@@ -2341,11 +2339,11 @@ const Map<String, List<Test>> SEND_TESTS = const {
m() => new Class(true, 42);
''',
const Visit(
- VisitKind.ERROR_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
element: 'function(Class#)',
arguments: '(true,42)',
type: 'Class',
- selector: 'Selector(call, , arity=2)')),
+ selector: 'CallStructure(arity=2)')),
],
};
@@ -5279,31 +5277,31 @@ class SemanticSendTestVisitor extends SemanticTestVisitor {
}
@override
- errorUnresolvedClassConstructorInvoke(
+ visitUnresolvedClassConstructorInvoke(
NewExpression node,
Element constructor,
- MalformedType type,
+ DartType type,
NodeList arguments,
Selector selector,
arg) {
- // TODO(johnniwinther): Test [type] and [selector].
+ // TODO(johnniwinther): Test [type] when it is not `dynamic`.
visits.add(new Visit(
- VisitKind.ERROR_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE,
arguments: arguments));
apply(arguments, arg);
}
@override
- errorUnresolvedConstructorInvoke(
+ visitUnresolvedConstructorInvoke(
NewExpression node,
Element constructor,
DartType type,
NodeList arguments,
Selector selector,
arg) {
- // TODO(johnniwinther): Test [type] and [selector].
+ // TODO(johnniwinther): Test [type] when it is not `dynamic`.
visits.add(new Visit(
- VisitKind.ERROR_UNRESOLVED_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_CONSTRUCTOR_INVOKE,
arguments: arguments));
apply(arguments, arg);
}
@@ -5390,7 +5388,7 @@ class SemanticSendTestVisitor extends SemanticTestVisitor {
}
@override
- errorAbstractClassConstructorInvoke(
+ visitAbstractClassConstructorInvoke(
NewExpression node,
ConstructorElement constructor,
InterfaceType type,
@@ -5398,7 +5396,7 @@ class SemanticSendTestVisitor extends SemanticTestVisitor {
CallStructure callStructure,
arg) {
visits.add(new Visit(
- VisitKind.ERROR_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE,
element: constructor,
type: type,
arguments: arguments,
@@ -5407,19 +5405,19 @@ class SemanticSendTestVisitor extends SemanticTestVisitor {
}
@override
- errorUnresolvedRedirectingFactoryConstructorInvoke(
+ visitUnresolvedRedirectingFactoryConstructorInvoke(
NewExpression node,
ConstructorElement constructor,
InterfaceType type,
NodeList arguments,
- Selector selector,
+ CallStructure callStructure,
arg) {
visits.add(new Visit(
- VisitKind.ERROR_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
element: constructor,
type: type,
arguments: arguments,
- selector: selector));
+ selector: callStructure));
apply(arguments, arg);
}
}
@@ -5902,7 +5900,7 @@ class SemanticDeclarationTestVisitor extends SemanticTestVisitor {
}
@override
- errorUnresolvedClassConstructorInvoke(
+ visitUnresolvedClassConstructorInvoke(
NewExpression node,
Element constructor,
MalformedType type,
@@ -5911,13 +5909,13 @@ class SemanticDeclarationTestVisitor extends SemanticTestVisitor {
arg) {
// TODO(johnniwinther): Test [type] and [selector].
visits.add(new Visit(
- VisitKind.ERROR_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE,
arguments: arguments));
apply(arguments, arg);
}
@override
- errorUnresolvedConstructorInvoke(
+ visitUnresolvedConstructorInvoke(
NewExpression node,
Element constructor,
DartType type,
@@ -5926,7 +5924,7 @@ class SemanticDeclarationTestVisitor extends SemanticTestVisitor {
arg) {
// TODO(johnniwinther): Test [type] and [selector].
visits.add(new Visit(
- VisitKind.ERROR_UNRESOLVED_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_CONSTRUCTOR_INVOKE,
arguments: arguments));
apply(arguments, arg);
}
@@ -6013,7 +6011,7 @@ class SemanticDeclarationTestVisitor extends SemanticTestVisitor {
}
@override
- errorAbstractClassConstructorInvoke(
+ visitAbstractClassConstructorInvoke(
NewExpression node,
ConstructorElement constructor,
InterfaceType type,
@@ -6021,7 +6019,7 @@ class SemanticDeclarationTestVisitor extends SemanticTestVisitor {
CallStructure callStructure,
arg) {
visits.add(new Visit(
- VisitKind.ERROR_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE,
element: constructor,
type: type,
arguments: arguments,
@@ -6030,19 +6028,19 @@ class SemanticDeclarationTestVisitor extends SemanticTestVisitor {
}
@override
- errorUnresolvedRedirectingFactoryConstructorInvoke(
+ visitUnresolvedRedirectingFactoryConstructorInvoke(
NewExpression node,
ConstructorElement constructor,
InterfaceType type,
NodeList arguments,
- Selector selector,
+ CallStructure callStructure,
arg) {
visits.add(new Visit(
- VisitKind.ERROR_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
+ VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
element: constructor,
type: type,
arguments: arguments,
- selector: selector));
+ selector: callStructure));
apply(arguments, arg);
}
}
@@ -6239,10 +6237,10 @@ enum VisitKind {
VISIT_THIS_CONSTRUCTOR_INVOKE,
VISIT_FIELD_INITIALIZER,
- ERROR_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE,
- ERROR_UNRESOLVED_CONSTRUCTOR_INVOKE,
- ERROR_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE,
- ERROR_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
+ VISIT_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE,
+ VISIT_UNRESOLVED_CONSTRUCTOR_INVOKE,
+ VISIT_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE,
+ VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
VISIT_INSTANCE_GETTER_DECL,
VISIT_INSTANCE_SETTER_DECL,
« no previous file with comments | « pkg/compiler/lib/src/resolution/send_structure.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698