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

Side by Side Diff: pkg/analyzer_experimental/test/generated/parser_test.dart

Issue 26307005: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.parser_test; 3 library engine.parser_test;
4 import 'package:analyzer_experimental/src/generated/java_core.dart'; 4 import 'package:analyzer_experimental/src/generated/java_core.dart';
5 import 'package:analyzer_experimental/src/generated/java_junit.dart'; 5 import 'package:analyzer_experimental/src/generated/java_junit.dart';
6 import 'package:analyzer_experimental/src/generated/error.dart'; 6 import 'package:analyzer_experimental/src/generated/error.dart';
7 import 'package:analyzer_experimental/src/generated/scanner.dart'; 7 import 'package:analyzer_experimental/src/generated/scanner.dart';
8 import 'package:analyzer_experimental/src/generated/ast.dart'; 8 import 'package:analyzer_experimental/src/generated/ast.dart';
9 import 'package:analyzer_experimental/src/generated/parser.dart'; 9 import 'package:analyzer_experimental/src/generated/parser.dart';
10 import 'package:analyzer_experimental/src/generated/utilities_dart.dart'; 10 import 'package:analyzer_experimental/src/generated/utilities_dart.dart';
(...skipping 6083 matching lines...) Expand 10 before | Expand all | Expand 10 after
6094 void test_assignmentExpression_propertyAccess() { 6094 void test_assignmentExpression_propertyAccess() {
6095 AssignmentExpression expression = ParserTestCase.parseExpression("super.y = 0", []); 6095 AssignmentExpression expression = ParserTestCase.parseExpression("super.y = 0", []);
6096 EngineTestCase.assertInstanceOf(PropertyAccess, expression.leftHandSide); 6096 EngineTestCase.assertInstanceOf(PropertyAccess, expression.leftHandSide);
6097 EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightHandSide); 6097 EngineTestCase.assertInstanceOf(IntegerLiteral, expression.rightHandSide);
6098 } 6098 }
6099 void test_bitwiseAndExpression_normal() { 6099 void test_bitwiseAndExpression_normal() {
6100 BinaryExpression expression = ParserTestCase.parseExpression("x & y & z", [] ); 6100 BinaryExpression expression = ParserTestCase.parseExpression("x & y & z", [] );
6101 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6101 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6102 } 6102 }
6103 void test_bitwiseAndExpression_precedence_equality_left() { 6103 void test_bitwiseAndExpression_precedence_equality_left() {
6104 BinaryExpression expression = ParserTestCase.parseExpression("x == y & z", [ ]); 6104 BinaryExpression expression = ParserTestCase.parseExpression("x == y && z", []);
6105 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6105 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6106 } 6106 }
6107 void test_bitwiseAndExpression_precedence_equality_right() { 6107 void test_bitwiseAndExpression_precedence_equality_right() {
6108 BinaryExpression expression = ParserTestCase.parseExpression("x & y == z", [ ]); 6108 BinaryExpression expression = ParserTestCase.parseExpression("x && y == z", []);
6109 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); 6109 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
6110 } 6110 }
6111 void test_bitwiseAndExpression_super() { 6111 void test_bitwiseAndExpression_super() {
6112 BinaryExpression expression = ParserTestCase.parseExpression("super & y & z" , []); 6112 BinaryExpression expression = ParserTestCase.parseExpression("super & y & z" , []);
6113 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6113 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6114 } 6114 }
6115 void test_bitwiseOrExpression_normal() { 6115 void test_bitwiseOrExpression_normal() {
6116 BinaryExpression expression = ParserTestCase.parseExpression("x | y | z", [] ); 6116 BinaryExpression expression = ParserTestCase.parseExpression("x | y | z", [] );
6117 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6117 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6118 } 6118 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
6184 } 6184 }
6185 void test_equalityExpression_super() { 6185 void test_equalityExpression_super() {
6186 BinaryExpression expression = ParserTestCase.parseExpression("super == y != z", [ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]); 6186 BinaryExpression expression = ParserTestCase.parseExpression("super == y != z", [ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
6187 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6187 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6188 } 6188 }
6189 void test_logicalAndExpression() { 6189 void test_logicalAndExpression() {
6190 BinaryExpression expression = ParserTestCase.parseExpression("x && y && z", []); 6190 BinaryExpression expression = ParserTestCase.parseExpression("x && y && z", []);
6191 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6191 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6192 } 6192 }
6193 void test_logicalAndExpression_precedence_bitwiseOr_left() { 6193 void test_logicalAndExpression_precedence_bitwiseOr_left() {
6194 BinaryExpression expression = ParserTestCase.parseExpression("x | y && z", [ ]); 6194 BinaryExpression expression = ParserTestCase.parseExpression("x | y < z", [] );
6195 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6195 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6196 } 6196 }
6197 void test_logicalAndExpression_precedence_bitwiseOr_right() { 6197 void test_logicalAndExpression_precedence_bitwiseOr_right() {
6198 BinaryExpression expression = ParserTestCase.parseExpression("x && y | z", [ ]); 6198 BinaryExpression expression = ParserTestCase.parseExpression("x < y | z", [] );
6199 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); 6199 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
6200 } 6200 }
6201 void test_logicalOrExpression() { 6201 void test_logicalOrExpression() {
6202 BinaryExpression expression = ParserTestCase.parseExpression("x || y || z", []); 6202 BinaryExpression expression = ParserTestCase.parseExpression("x || y || z", []);
6203 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6203 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6204 } 6204 }
6205 void test_logicalOrExpression_precedence_logicalAnd_left() { 6205 void test_logicalOrExpression_precedence_logicalAnd_left() {
6206 BinaryExpression expression = ParserTestCase.parseExpression("x && y || z", []); 6206 BinaryExpression expression = ParserTestCase.parseExpression("x && y || z", []);
6207 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6207 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6208 } 6208 }
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
6865 BinaryExpression expression = ParserTestCase.parseExpression("x &", [ParserE rrorCode.MISSING_IDENTIFIER]); 6865 BinaryExpression expression = ParserTestCase.parseExpression("x &", [ParserE rrorCode.MISSING_IDENTIFIER]);
6866 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); 6866 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
6867 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); 6867 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
6868 } 6868 }
6869 void test_bitwiseAndExpression_missing_RHS_super() { 6869 void test_bitwiseAndExpression_missing_RHS_super() {
6870 BinaryExpression expression = ParserTestCase.parseExpression("super &", [Par serErrorCode.MISSING_IDENTIFIER]); 6870 BinaryExpression expression = ParserTestCase.parseExpression("super &", [Par serErrorCode.MISSING_IDENTIFIER]);
6871 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand); 6871 EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
6872 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic); 6872 JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
6873 } 6873 }
6874 void test_bitwiseAndExpression_precedence_equality_left() { 6874 void test_bitwiseAndExpression_precedence_equality_left() {
6875 BinaryExpression expression = ParserTestCase.parseExpression("== &", [ 6875 BinaryExpression expression = ParserTestCase.parseExpression("== &&", [
6876 ParserErrorCode.MISSING_IDENTIFIER, 6876 ParserErrorCode.MISSING_IDENTIFIER,
6877 ParserErrorCode.MISSING_IDENTIFIER, 6877 ParserErrorCode.MISSING_IDENTIFIER,
6878 ParserErrorCode.MISSING_IDENTIFIER]); 6878 ParserErrorCode.MISSING_IDENTIFIER]);
6879 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6879 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
6880 } 6880 }
6881 void test_bitwiseAndExpression_precedence_equality_right() { 6881 void test_bitwiseAndExpression_precedence_equality_right() {
6882 BinaryExpression expression = ParserTestCase.parseExpression("& ==", [ 6882 BinaryExpression expression = ParserTestCase.parseExpression("&& ==", [
6883 ParserErrorCode.MISSING_IDENTIFIER, 6883 ParserErrorCode.MISSING_IDENTIFIER,
6884 ParserErrorCode.MISSING_IDENTIFIER, 6884 ParserErrorCode.MISSING_IDENTIFIER,
6885 ParserErrorCode.MISSING_IDENTIFIER]); 6885 ParserErrorCode.MISSING_IDENTIFIER]);
6886 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand); 6886 EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
6887 } 6887 }
6888 void test_bitwiseAndExpression_super() { 6888 void test_bitwiseAndExpression_super() {
6889 BinaryExpression expression = ParserTestCase.parseExpression("super & &", [ 6889 BinaryExpression expression = ParserTestCase.parseExpression("super & &", [
6890 ParserErrorCode.MISSING_IDENTIFIER, 6890 ParserErrorCode.MISSING_IDENTIFIER,
6891 ParserErrorCode.MISSING_IDENTIFIER]); 6891 ParserErrorCode.MISSING_IDENTIFIER]);
6892 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand); 6892 EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
(...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after
9534 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelFunction(arg0)), 9534 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelFunction(arg0)),
9535 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelVariable(arg0)), 9535 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelVariable(arg0)),
9536 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0) => target.validateModifiersForTypedef(arg0)),}; 9536 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0) => target.validateModifiersForTypedef(arg0)),};
9537 9537
9538 9538
9539 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj ects, Token tokenStream) { 9539 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj ects, Token tokenStream) {
9540 parser.currentToken = tokenStream; 9540 parser.currentToken = tokenStream;
9541 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length} ']; 9541 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length} '];
9542 return method.invoke(parser, objects); 9542 return method.invoke(parser, objects);
9543 } 9543 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/resolver.dart ('k') | pkg/analyzer_experimental/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698