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

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

Issue 123763002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 3
4 library engine.parser_test; 4 library engine.parser_test;
5 5
6 import 'package:analyzer/src/generated/java_core.dart'; 6 import 'package:analyzer/src/generated/java_core.dart';
7 import 'package:analyzer/src/generated/java_junit.dart'; 7 import 'package:analyzer/src/generated/java_junit.dart';
8 import 'package:analyzer/src/generated/error.dart'; 8 import 'package:analyzer/src/generated/error.dart';
9 import 'package:analyzer/src/generated/source.dart' show Source; 9 import 'package:analyzer/src/generated/source.dart' show Source;
10 import 'package:analyzer/src/generated/scanner.dart'; 10 import 'package:analyzer/src/generated/scanner.dart';
(...skipping 4386 matching lines...) Expand 10 before | Expand all | Expand 10 after
4397 /** 4397 /**
4398 * Invoke the method [Parser#computeStringValue] with the given argument. 4398 * Invoke the method [Parser#computeStringValue] with the given argument.
4399 * 4399 *
4400 * @param lexeme the argument to the method 4400 * @param lexeme the argument to the method
4401 * @param first `true` if this is the first token in a string literal 4401 * @param first `true` if this is the first token in a string literal
4402 * @param last `true` if this is the last token in a string literal 4402 * @param last `true` if this is the last token in a string literal
4403 * @return the result of invoking the method 4403 * @return the result of invoking the method
4404 * @throws Exception if the method could not be invoked or throws an exception 4404 * @throws Exception if the method could not be invoked or throws an exception
4405 */ 4405 */
4406 String computeStringValue(String lexeme, bool first, bool last) { 4406 String computeStringValue(String lexeme, bool first, bool last) {
4407 AnalysisErrorListener listener = new AnalysisErrorListener_27(); 4407 AnalysisErrorListener listener = new AnalysisErrorListener_28();
4408 Parser parser = new Parser(null, listener); 4408 Parser parser = new Parser(null, listener);
4409 return invokeParserMethodImpl(parser, "computeStringValue", <Object> [lexeme , first, last], null) as String; 4409 return invokeParserMethodImpl(parser, "computeStringValue", <Object> [lexeme , first, last], null) as String;
4410 } 4410 }
4411 4411
4412 /** 4412 /**
4413 * Invoke the method [Parser#createSyntheticIdentifier] with the parser set to the token 4413 * Invoke the method [Parser#createSyntheticIdentifier] with the parser set to the token
4414 * stream produced by scanning the given source. 4414 * stream produced by scanning the given source.
4415 * 4415 *
4416 * @param source the source to be scanned to produce the token stream being te sted 4416 * @param source the source to be scanned to produce the token stream being te sted
4417 * @return the result of invoking the method 4417 * @return the result of invoking the method
(...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after
6667 runJUnitTest(__test, __test.test_skipTypeName_parameterized); 6667 runJUnitTest(__test, __test.test_skipTypeName_parameterized);
6668 }); 6668 });
6669 _ut.test('test_skipTypeName_simple', () { 6669 _ut.test('test_skipTypeName_simple', () {
6670 final __test = new SimpleParserTest(); 6670 final __test = new SimpleParserTest();
6671 runJUnitTest(__test, __test.test_skipTypeName_simple); 6671 runJUnitTest(__test, __test.test_skipTypeName_simple);
6672 }); 6672 });
6673 }); 6673 });
6674 } 6674 }
6675 } 6675 }
6676 6676
6677 class AnalysisErrorListener_27 implements AnalysisErrorListener { 6677 class AnalysisErrorListener_28 implements AnalysisErrorListener {
6678 void onError(AnalysisError event) { 6678 void onError(AnalysisError event) {
6679 JUnitTestCase.fail("Unexpected compilation error: ${event.message} (${event. offset}, ${event.length})"); 6679 JUnitTestCase.fail("Unexpected compilation error: ${event.message} (${event. offset}, ${event.length})");
6680 } 6680 }
6681 } 6681 }
6682 6682
6683 class NonErrorParserTest extends ParserTestCase { 6683 class NonErrorParserTest extends ParserTestCase {
6684 void test_constFactory_external() { 6684 void test_constFactory_external() {
6685 ParserTestCase.parse("parseClassMember", <Object> ["C"], "external const fac tory C();"); 6685 ParserTestCase.parse("parseClassMember", <Object> ["C"], "external const fac tory C();");
6686 } 6686 }
6687 6687
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
7676 FunctionExpressionInvocation toNode = ASTFactory.functionExpressionInvocatio n(ASTFactory.identifier3("f"), []); 7676 FunctionExpressionInvocation toNode = ASTFactory.functionExpressionInvocatio n(ASTFactory.identifier3("f"), []);
7677 ResolutionCopier.copyResolutionData(fromNode, toNode); 7677 ResolutionCopier.copyResolutionData(fromNode, toNode);
7678 JUnitTestCase.assertSame(propagatedElement, toNode.propagatedElement); 7678 JUnitTestCase.assertSame(propagatedElement, toNode.propagatedElement);
7679 JUnitTestCase.assertSame(propagatedType, toNode.propagatedType); 7679 JUnitTestCase.assertSame(propagatedType, toNode.propagatedType);
7680 JUnitTestCase.assertSame(staticElement, toNode.staticElement); 7680 JUnitTestCase.assertSame(staticElement, toNode.staticElement);
7681 JUnitTestCase.assertSame(staticType, toNode.staticType); 7681 JUnitTestCase.assertSame(staticType, toNode.staticType);
7682 } 7682 }
7683 7683
7684 void test_visitImportDirective() { 7684 void test_visitImportDirective() {
7685 ImportDirective fromNode = ASTFactory.importDirective2("dart:uri", null, []) ; 7685 ImportDirective fromNode = ASTFactory.importDirective2("dart:uri", null, []) ;
7686 ImportElement element = new ImportElementImpl(); 7686 ImportElement element = new ImportElementImpl(0);
7687 fromNode.element = element; 7687 fromNode.element = element;
7688 ImportDirective toNode = ASTFactory.importDirective2("dart:uri", null, []); 7688 ImportDirective toNode = ASTFactory.importDirective2("dart:uri", null, []);
7689 ResolutionCopier.copyResolutionData(fromNode, toNode); 7689 ResolutionCopier.copyResolutionData(fromNode, toNode);
7690 JUnitTestCase.assertSame(element, toNode.element); 7690 JUnitTestCase.assertSame(element, toNode.element);
7691 } 7691 }
7692 7692
7693 void test_visitIndexExpression() { 7693 void test_visitIndexExpression() {
7694 IndexExpression fromNode = ASTFactory.indexExpression(ASTFactory.identifier3 ("a"), ASTFactory.integer(0)); 7694 IndexExpression fromNode = ASTFactory.indexExpression(ASTFactory.identifier3 ("a"), ASTFactory.integer(0));
7695 MethodElement propagatedElement = ElementFactory.methodElement("m", ElementF actory.classElement2("C", []).type, []); 7695 MethodElement propagatedElement = ElementFactory.methodElement("m", ElementF actory.classElement2("C", []).type, []);
7696 MethodElement staticElement = ElementFactory.methodElement("m", ElementFacto ry.classElement2("C", []).type, []); 7696 MethodElement staticElement = ElementFactory.methodElement("m", ElementFacto ry.classElement2("C", []).type, []);
(...skipping 3935 matching lines...) Expand 10 before | Expand all | Expand 10 after
11632 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelFunction(arg0)), 11632 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelFunction(arg0)),
11633 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelVariable(arg0)), 11633 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelVariable(arg0)),
11634 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0) => target.validateModifiersForTypedef(arg0)),}; 11634 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0) => target.validateModifiersForTypedef(arg0)),};
11635 11635
11636 11636
11637 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj ects, Token tokenStream) { 11637 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj ects, Token tokenStream) {
11638 parser.currentToken = tokenStream; 11638 parser.currentToken = tokenStream;
11639 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length} ']; 11639 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length} '];
11640 return method.invoke(parser, objects); 11640 return method.invoke(parser, objects);
11641 } 11641 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/element_test.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698