| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library engine.parser_test; | 5 library engine.parser_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/error.dart'; | 9 import 'package:analyzer/src/generated/error.dart'; |
| 10 import 'package:analyzer/src/generated/incremental_scanner.dart'; | 10 import 'package:analyzer/src/generated/incremental_scanner.dart'; |
| (...skipping 4023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4034 DartType staticType = ElementFactory.classElement2("C").type; | 4034 DartType staticType = ElementFactory.classElement2("C").type; |
| 4035 fromNode.staticType = staticType; | 4035 fromNode.staticType = staticType; |
| 4036 DoubleLiteral toNode = AstFactory.doubleLiteral(1.0); | 4036 DoubleLiteral toNode = AstFactory.doubleLiteral(1.0); |
| 4037 ResolutionCopier.copyResolutionData(fromNode, toNode); | 4037 ResolutionCopier.copyResolutionData(fromNode, toNode); |
| 4038 expect(toNode.propagatedType, same(propagatedType)); | 4038 expect(toNode.propagatedType, same(propagatedType)); |
| 4039 expect(toNode.staticType, same(staticType)); | 4039 expect(toNode.staticType, same(staticType)); |
| 4040 } | 4040 } |
| 4041 | 4041 |
| 4042 void test_visitExportDirective() { | 4042 void test_visitExportDirective() { |
| 4043 ExportDirective fromNode = AstFactory.exportDirective2("dart:uri"); | 4043 ExportDirective fromNode = AstFactory.exportDirective2("dart:uri"); |
| 4044 ExportElement element = new ExportElementImpl(); | 4044 ExportElement element = new ExportElementImpl(-1); |
| 4045 fromNode.element = element; | 4045 fromNode.element = element; |
| 4046 ExportDirective toNode = AstFactory.exportDirective2("dart:uri"); | 4046 ExportDirective toNode = AstFactory.exportDirective2("dart:uri"); |
| 4047 ResolutionCopier.copyResolutionData(fromNode, toNode); | 4047 ResolutionCopier.copyResolutionData(fromNode, toNode); |
| 4048 expect(toNode.element, same(element)); | 4048 expect(toNode.element, same(element)); |
| 4049 } | 4049 } |
| 4050 | 4050 |
| 4051 void test_visitFunctionExpression() { | 4051 void test_visitFunctionExpression() { |
| 4052 FunctionExpression fromNode = AstFactory.functionExpression2( | 4052 FunctionExpression fromNode = AstFactory.functionExpression2( |
| 4053 AstFactory.formalParameterList(), AstFactory.emptyFunctionBody()); | 4053 AstFactory.formalParameterList(), AstFactory.emptyFunctionBody()); |
| 4054 MethodElement element = ElementFactory.methodElement( | 4054 MethodElement element = ElementFactory.methodElement( |
| (...skipping 6149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10204 new Scanner(null, new CharSequenceReader(source), listener); | 10204 new Scanner(null, new CharSequenceReader(source), listener); |
| 10205 Token tokenStream = scanner.tokenize(); | 10205 Token tokenStream = scanner.tokenize(); |
| 10206 // | 10206 // |
| 10207 // Parse the source. | 10207 // Parse the source. |
| 10208 // | 10208 // |
| 10209 Parser parser = new Parser(null, listener); | 10209 Parser parser = new Parser(null, listener); |
| 10210 return invokeParserMethodImpl( | 10210 return invokeParserMethodImpl( |
| 10211 parser, methodName, <Object>[tokenStream], tokenStream) as Token; | 10211 parser, methodName, <Object>[tokenStream], tokenStream) as Token; |
| 10212 } | 10212 } |
| 10213 } | 10213 } |
| OLD | NEW |