| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.all_the_rest_test; | 8 library engine.all_the_rest_test; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 analysisContext.resolveCompilationUnit(source, library); | 835 analysisContext.resolveCompilationUnit(source, library); |
| 836 expect(unit, isNotNull); | 836 expect(unit, isNotNull); |
| 837 NodeList<CompilationUnitMember> declarations = unit.declarations; | 837 NodeList<CompilationUnitMember> declarations = unit.declarations; |
| 838 expect(declarations, hasLength(1)); | 838 expect(declarations, hasLength(1)); |
| 839 CompilationUnitMember declaration = declarations[0]; | 839 CompilationUnitMember declaration = declarations[0]; |
| 840 EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableDeclaration, | 840 EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableDeclaration, |
| 841 TopLevelVariableDeclaration, declaration); | 841 TopLevelVariableDeclaration, declaration); |
| 842 NodeList<VariableDeclaration> variables = | 842 NodeList<VariableDeclaration> variables = |
| 843 (declaration as TopLevelVariableDeclaration).variables.variables; | 843 (declaration as TopLevelVariableDeclaration).variables.variables; |
| 844 expect(variables, hasLength(1)); | 844 expect(variables, hasLength(1)); |
| 845 ConstantEvaluator evaluator = new ConstantEvaluator( | 845 ConstantEvaluator evaluator = |
| 846 source, (analysisContext as AnalysisContextImpl).typeProvider); | 846 new ConstantEvaluator(source, analysisContext.typeProvider); |
| 847 return evaluator.evaluate(variables[0].initializer); | 847 return evaluator.evaluate(variables[0].initializer); |
| 848 } | 848 } |
| 849 } | 849 } |
| 850 | 850 |
| 851 @reflectiveTest | 851 @reflectiveTest |
| 852 class ConstantFinderTest extends EngineTestCase { | 852 class ConstantFinderTest extends EngineTestCase { |
| 853 AstNode _node; | 853 AstNode _node; |
| 854 | 854 |
| 855 /** | 855 /** |
| 856 * Test an annotation that consists solely of an identifier (and hence | 856 * Test an annotation that consists solely of an identifier (and hence |
| (...skipping 7724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8581 if (_expectedExternalScriptName == null) { | 8581 if (_expectedExternalScriptName == null) { |
| 8582 expect(scriptSource, isNull, reason: "script $scriptIndex"); | 8582 expect(scriptSource, isNull, reason: "script $scriptIndex"); |
| 8583 } else { | 8583 } else { |
| 8584 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); | 8584 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); |
| 8585 String actualExternalScriptName = scriptSource.shortName; | 8585 String actualExternalScriptName = scriptSource.shortName; |
| 8586 expect(actualExternalScriptName, _expectedExternalScriptName, | 8586 expect(actualExternalScriptName, _expectedExternalScriptName, |
| 8587 reason: "script $scriptIndex"); | 8587 reason: "script $scriptIndex"); |
| 8588 } | 8588 } |
| 8589 } | 8589 } |
| 8590 } | 8590 } |
| OLD | NEW |