| 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 testing.abstract_context; | 5 library testing.abstract_context; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 AnalysisDriver get driver { | 67 AnalysisDriver get driver { |
| 68 if (enableNewAnalysisDriver) { | 68 if (enableNewAnalysisDriver) { |
| 69 return _driver; | 69 return _driver; |
| 70 } | 70 } |
| 71 throw new StateError('Should be used with the new analysis driver.'); | 71 throw new StateError('Should be used with the new analysis driver.'); |
| 72 } | 72 } |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * Return `true` if the new analysis driver should be used by these tests. | 75 * Return `true` if the new analysis driver should be used by these tests. |
| 76 * |
| 77 * Remove this after there are no subclasses that override it. |
| 76 */ | 78 */ |
| 77 bool get enableNewAnalysisDriver => false; | 79 bool get enableNewAnalysisDriver => true; |
| 78 | 80 |
| 79 Source addMetaPackageSource() => addPackageSource( | 81 Source addMetaPackageSource() => addPackageSource( |
| 80 'meta', | 82 'meta', |
| 81 'meta.dart', | 83 'meta.dart', |
| 82 r''' | 84 r''' |
| 83 library meta; | 85 library meta; |
| 84 | 86 |
| 85 const Required required = const Required(); | 87 const Required required = const Required(); |
| 86 | 88 |
| 87 class Required { | 89 class Required { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 * [engine.GeneralizingElementVisitor]. | 217 * [engine.GeneralizingElementVisitor]. |
| 216 */ | 218 */ |
| 217 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { | 219 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { |
| 218 final _ElementVisitorFunction function; | 220 final _ElementVisitorFunction function; |
| 219 _ElementVisitorFunctionWrapper(this.function); | 221 _ElementVisitorFunctionWrapper(this.function); |
| 220 visitElement(Element element) { | 222 visitElement(Element element) { |
| 221 function(element); | 223 function(element); |
| 222 super.visitElement(element); | 224 super.visitElement(element); |
| 223 } | 225 } |
| 224 } | 226 } |
| OLD | NEW |