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/source/embedder.dart'; | 9 import 'package:analyzer/source/embedder.dart'; |
10 import 'package:analyzer/src/context/cache.dart'; | 10 import 'package:analyzer/src/context/cache.dart'; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void onData(ImplicitAnalysisEvent event) { | 65 void onData(ImplicitAnalysisEvent event) { |
66 actualEvents.add(event); | 66 actualEvents.add(event); |
67 if (event.isAnalyzed) { | 67 if (event.isAnalyzed) { |
68 analyzedSources.add(event.source); | 68 analyzedSources.add(event.source); |
69 } else { | 69 } else { |
70 analyzedSources.remove(event.source); | 70 analyzedSources.remove(event.source); |
71 } | 71 } |
72 } | 72 } |
73 } | 73 } |
74 | 74 |
75 class CompilationUnitMock extends TypedMock implements CompilationUnit { | 75 class CompilationUnitMock extends TypedMock implements CompilationUnit {} |
76 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | |
77 } | |
78 | 76 |
79 class MockSourceFactory extends SourceFactory { | 77 class MockSourceFactory extends SourceFactory { |
80 MockSourceFactory() : super([]); | 78 MockSourceFactory() : super([]); |
81 Source resolveUri(Source containingSource, String containedUri) { | 79 Source resolveUri(Source containingSource, String containedUri) { |
82 throw new JavaIOException(); | 80 throw new JavaIOException(); |
83 } | 81 } |
84 } | 82 } |
85 | 83 |
86 @reflectiveTest | 84 @reflectiveTest |
87 class SourcesChangedEventTest { | 85 class SourcesChangedEventTest { |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 bool validateCacheConsistency() { | 667 bool validateCacheConsistency() { |
670 fail("Unexpected invocation of validateCacheConsistency"); | 668 fail("Unexpected invocation of validateCacheConsistency"); |
671 return false; | 669 return false; |
672 } | 670 } |
673 | 671 |
674 @override | 672 @override |
675 void visitContentCache(ContentCacheVisitor visitor) { | 673 void visitContentCache(ContentCacheVisitor visitor) { |
676 fail("Unexpected invocation of visitContentCache"); | 674 fail("Unexpected invocation of visitContentCache"); |
677 } | 675 } |
678 } | 676 } |
OLD | NEW |