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

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

Issue 1152013006: Test all methods in semantic_visitor_test. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | « tests/compiler/dart2js/semantic_visitor_test_send_data.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_send_visitor.dart
diff --git a/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart b/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart
index 1021ee0a8ac7c3b2983bf727e9c9d19b6895f203..196df43847d5819d7a8e430b45b0be7335c3a5e5 100644
--- a/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart
@@ -25,7 +25,16 @@ class SemanticSendTestVisitor extends SemanticTestVisitor {
Node expression,
arg) {
visits.add(new Visit(VisitKind.VISIT_ASSERT, expression: expression));
- apply(expression, arg);
+ super.visitAssert(node, expression, arg);
+ }
+
+ @override
+ errorInvalidAssert(
+ Send node,
+ NodeList arguments,
+ arg) {
+ visits.add(new Visit(VisitKind.ERROR_INVALID_ASSERT, arguments: arguments));
+ super.errorInvalidAssert(node, arguments, arg);
}
@override
@@ -37,8 +46,19 @@ class SemanticSendTestVisitor extends SemanticTestVisitor {
arg) {
visits.add(new Visit(VisitKind.VISIT_BINARY,
left: left, operator: operator, right: right));
- apply(left, arg);
- apply(right, arg);
+ super.visitBinary(node, left, operator, right, arg);
+ }
+
+ @override
+ errorUndefinedBinaryExpression(
+ Send node,
+ Node left,
+ Operator operator,
+ Node right,
+ arg) {
+ visits.add(new Visit(VisitKind.ERROR_UNDEFINED_BINARY_EXPRESSION,
+ left: left, operator: operator, right: right));
+ super.errorUndefinedBinaryExpression(node, left, operator, right, arg);
}
@override
@@ -848,7 +868,18 @@ class SemanticSendTestVisitor extends SemanticTestVisitor {
arg) {
visits.add(new Visit(VisitKind.VISIT_UNARY,
expression: expression, operator: operator));
- apply(expression, arg);
+ super.visitUnary(node, operator, expression, arg);
+ }
+
+ @override
+ errorUndefinedUnaryExpression(
+ Send node,
+ Operator operator,
+ Node expression,
+ arg) {
+ visits.add(new Visit(VisitKind.ERROR_UNDEFINED_UNARY_EXPRESSION,
+ expression: expression, operator: operator));
+ super.errorUndefinedUnaryExpression(node, operator, expression, arg);
}
@override
@@ -2781,4 +2812,118 @@ class SemanticSendTestVisitor extends SemanticTestVisitor {
visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_PREFIX,
getter: getter, operator: operator));
}
+
+ @override
+ visitIfNotNullDynamicPropertyGet(
+ Send node,
+ Node receiver,
+ Selector selector,
+ arg) {
+ visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_GET,
+ receiver: receiver, name: selector.name));
+ super.visitIfNotNullDynamicPropertyGet(node, receiver, selector, arg);
+ }
+
+ @override
+ visitIfNotNullDynamicPropertySet(
+ Send node,
+ Node receiver,
+ Selector selector,
+ Node rhs,
+ arg) {
+ visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_SET,
+ receiver: receiver, name: selector.name, rhs: rhs));
+ super.visitIfNotNullDynamicPropertySet(node, receiver, selector, rhs, arg);
+ }
+
+ @override
+ visitIfNotNullDynamicPropertyInvoke(
+ Send node,
+ Node receiver,
+ NodeList arguments,
+ Selector selector,
+ arg) {
+ visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_INVOKE,
+ receiver: receiver, selector: selector, arguments: arguments));
+ super.visitIfNotNullDynamicPropertyInvoke(
+ node, receiver, arguments, selector, arg);
+ }
+
+ @override
+ visitIfNotNullDynamicPropertyPrefix(
+ Send node,
+ Node receiver,
+ IncDecOperator operator,
+ Selector getterSelector,
+ Selector setterSelector,
+ arg) {
+ visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_PREFIX,
+ receiver: receiver, operator: operator,
+ getter: getterSelector, setter: setterSelector));
+ super.visitIfNotNullDynamicPropertyPrefix(
+ node, receiver, operator, getterSelector, setterSelector, arg);
+ }
+
+ @override
+ visitIfNotNullDynamicPropertyPostfix(
+ Send node,
+ Node receiver,
+ IncDecOperator operator,
+ Selector getterSelector,
+ Selector setterSelector,
+ arg) {
+ visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_POSTFIX,
+ receiver: receiver, operator: operator,
+ getter: getterSelector, setter: setterSelector));
+ super.visitIfNotNullDynamicPropertyPostfix(
+ node, receiver, operator, getterSelector, setterSelector, arg);
+ }
+
+ @override
+ visitIfNotNullDynamicPropertyCompound(
+ Send node,
+ Node receiver,
+ AssignmentOperator operator,
+ Node rhs,
+ Selector getterSelector,
+ Selector setterSelector,
+ arg) {
+ visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_COMPOUND,
+ receiver: receiver, operator: operator, rhs: rhs,
+ getter: getterSelector, setter: setterSelector));
+ super.visitIfNotNullDynamicPropertyCompound(
+ node, receiver, operator, rhs, getterSelector, setterSelector, arg);
+ }
+
+ @override
+ visitIfNull(
+ Send node,
+ Node left,
+ Node right,
+ arg) {
+ visits.add(new Visit(VisitKind.VISIT_IF_NULL, left: left, right: right));
+ super.visitIfNull(node, left, right, arg);
+ }
+
+ @override
+ visitConstantGet(
+ Send node,
+ ConstantExpression constant,
+ arg) {
+ visits.add(new Visit(VisitKind.VISIT_CONSTANT_GET,
+ constant: constant.getText()));
+ super.visitConstantGet(node, constant, arg);
+ }
+
+ @override
+ visitConstantInvoke(
+ Send node,
+ ConstantExpression constant,
+ NodeList arguments,
+ CallStructure callStructure,
+ arg) {
+ visits.add(new Visit(VisitKind.VISIT_CONSTANT_INVOKE,
+ constant: constant.getText()));
+ super.visitConstantInvoke(node, constant, arguments, callStructure, arg);
+ }
}
« no previous file with comments | « tests/compiler/dart2js/semantic_visitor_test_send_data.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698