| 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.incremental_resolver_test; | 5 library engine.incremental_resolver_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/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 2708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2719 '''); | 2719 '''); |
| 2720 } | 2720 } |
| 2721 | 2721 |
| 2722 /** | 2722 /** |
| 2723 * Reset the analysis context to have the 'incremental' option set to the | 2723 * Reset the analysis context to have the 'incremental' option set to the |
| 2724 * given value. | 2724 * given value. |
| 2725 */ | 2725 */ |
| 2726 void _resetWithIncremental(bool enable) { | 2726 void _resetWithIncremental(bool enable) { |
| 2727 AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl(); | 2727 AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl(); |
| 2728 analysisOptions.incremental = enable; | 2728 analysisOptions.incremental = enable; |
| 2729 analysisOptions.incrementalLog = null; |
| 2729 analysisContext2.analysisOptions = analysisOptions; | 2730 analysisContext2.analysisOptions = analysisOptions; |
| 2730 } | 2731 } |
| 2731 | 2732 |
| 2732 void _resolveUnit(String code) { | 2733 void _resolveUnit(String code) { |
| 2733 this.code = code; | 2734 this.code = code; |
| 2734 source = addSource(code); | 2735 source = addSource(code); |
| 2735 oldLibrary = resolve(source); | 2736 oldLibrary = resolve(source); |
| 2736 oldUnit = resolveCompilationUnit(source, oldLibrary); | 2737 oldUnit = resolveCompilationUnit(source, oldLibrary); |
| 2737 oldUnitElement = oldUnit.element; | 2738 oldUnitElement = oldUnit.element; |
| 2738 } | 2739 } |
| (...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3907 _visitList(node.metadata, other.metadata); | 3908 _visitList(node.metadata, other.metadata); |
| 3908 _visitNode(node.identifier, other.identifier); | 3909 _visitNode(node.identifier, other.identifier); |
| 3909 } | 3910 } |
| 3910 | 3911 |
| 3911 static void assertSameResolution(CompilationUnit actual, | 3912 static void assertSameResolution(CompilationUnit actual, |
| 3912 CompilationUnit expected) { | 3913 CompilationUnit expected) { |
| 3913 _SameResolutionValidator validator = new _SameResolutionValidator(expected); | 3914 _SameResolutionValidator validator = new _SameResolutionValidator(expected); |
| 3914 actual.accept(validator); | 3915 actual.accept(validator); |
| 3915 } | 3916 } |
| 3916 } | 3917 } |
| OLD | NEW |