| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 @deprecated |
| 5 library analyzer.test.constant_test; | 6 library analyzer.test.constant_test; |
| 6 | 7 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| 10 import 'package:analyzer/src/generated/constant.dart'; | 11 import 'package:analyzer/src/generated/constant.dart'; |
| 11 import 'package:analyzer/src/generated/source.dart'; | 12 import 'package:analyzer/src/generated/source.dart'; |
| 12 import 'package:analyzer/src/generated/source_io.dart'; | 13 import 'package:analyzer/src/generated/source_io.dart'; |
| 13 import 'package:unittest/unittest.dart'; | 14 import 'package:unittest/unittest.dart'; |
| 14 | 15 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 TopLevelVariableDeclaration, declaration); | 401 TopLevelVariableDeclaration, declaration); |
| 401 NodeList<VariableDeclaration> variables = | 402 NodeList<VariableDeclaration> variables = |
| 402 (declaration as TopLevelVariableDeclaration).variables.variables; | 403 (declaration as TopLevelVariableDeclaration).variables.variables; |
| 403 expect(variables, hasLength(1)); | 404 expect(variables, hasLength(1)); |
| 404 ConstantEvaluator evaluator = new ConstantEvaluator( | 405 ConstantEvaluator evaluator = new ConstantEvaluator( |
| 405 source, analysisContext.typeProvider, | 406 source, analysisContext.typeProvider, |
| 406 typeSystem: analysisContext.typeSystem); | 407 typeSystem: analysisContext.typeSystem); |
| 407 return evaluator.evaluate(variables[0].initializer); | 408 return evaluator.evaluate(variables[0].initializer); |
| 408 } | 409 } |
| 409 } | 410 } |
| OLD | NEW |