| 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 analyzer.test.generated.engine_test; | 5 library analyzer.test.generated.engine_test; |
| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 void assertNoMoreEvents() { | 183 void assertNoMoreEvents() { |
| 184 expect(actualEvents, []); | 184 expect(actualEvents, []); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void onData(SourcesChangedEvent event) { | 187 void onData(SourcesChangedEvent event) { |
| 188 actualEvents.add(event); | 188 actualEvents.add(event); |
| 189 } | 189 } |
| 190 } | 190 } |
| 191 | 191 |
| 192 /** | 192 /** |
| 193 * Instances of the class `TestAnalysisContext` implement an analysis context in
which every | 193 * An analysis context in which almost every method will cause a test to fail |
| 194 * method will cause a test to fail when invoked. | 194 * when invoked. |
| 195 */ | 195 */ |
| 196 class TestAnalysisContext implements InternalAnalysisContext { | 196 class TestAnalysisContext implements InternalAnalysisContext { |
| 197 @override | 197 @override |
| 198 final ReentrantSynchronousStream<InvalidatedResult> onResultInvalidated = |
| 199 new ReentrantSynchronousStream<InvalidatedResult>(); |
| 200 |
| 201 @override |
| 198 ResultProvider resultProvider; | 202 ResultProvider resultProvider; |
| 199 | 203 |
| 200 @override | 204 @override |
| 201 AnalysisCache get analysisCache { | 205 AnalysisCache get analysisCache { |
| 202 fail("Unexpected invocation of analysisCache"); | 206 fail("Unexpected invocation of analysisCache"); |
| 203 return null; | 207 return null; |
| 204 } | 208 } |
| 205 | 209 |
| 206 @override | 210 @override |
| 207 AnalysisOptions get analysisOptions { | 211 AnalysisOptions get analysisOptions { |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 bool validateCacheConsistency() { | 692 bool validateCacheConsistency() { |
| 689 fail("Unexpected invocation of validateCacheConsistency"); | 693 fail("Unexpected invocation of validateCacheConsistency"); |
| 690 return false; | 694 return false; |
| 691 } | 695 } |
| 692 | 696 |
| 693 @override | 697 @override |
| 694 void visitContentCache(ContentCacheVisitor visitor) { | 698 void visitContentCache(ContentCacheVisitor visitor) { |
| 695 fail("Unexpected invocation of visitContentCache"); | 699 fail("Unexpected invocation of visitContentCache"); |
| 696 } | 700 } |
| 697 } | 701 } |
| OLD | NEW |