| 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'; |
| 11 import 'package:analyzer/error/error.dart'; | 11 import 'package:analyzer/error/error.dart'; |
| 12 import 'package:analyzer/plugin/resolver_provider.dart'; | 12 import 'package:analyzer/plugin/resolver_provider.dart'; |
| 13 import 'package:analyzer/src/cancelable_future.dart'; | 13 import 'package:analyzer/src/cancelable_future.dart'; |
| 14 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator; | 14 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator; |
| 15 import 'package:analyzer/src/context/cache.dart'; | 15 import 'package:analyzer/src/context/cache.dart'; |
| 16 import 'package:analyzer/src/context/context.dart'; | 16 import 'package:analyzer/src/context/context.dart'; |
| 17 import 'package:analyzer/src/context/source.dart'; | 17 import 'package:analyzer/src/context/source.dart'; |
| 18 import 'package:analyzer/src/generated/constant.dart'; | 18 import 'package:analyzer/src/generated/constant.dart'; |
| 19 import 'package:analyzer/src/generated/engine.dart'; | 19 import 'package:analyzer/src/generated/engine.dart'; |
| 20 import 'package:analyzer/src/generated/resolver.dart'; | 20 import 'package:analyzer/src/generated/resolver.dart'; |
| 21 import 'package:analyzer/src/generated/source_io.dart'; | 21 import 'package:analyzer/src/generated/source_io.dart'; |
| 22 import 'package:analyzer/src/string_source.dart'; | 22 import 'package:analyzer/src/string_source.dart'; |
| 23 import 'package:analyzer/task/model.dart'; | 23 import 'package:analyzer/task/model.dart'; |
| 24 import 'package:html/dom.dart' show Document; | 24 import 'package:html/dom.dart' show Document; |
| 25 import 'package:test/test.dart'; | 25 import 'package:test/test.dart'; |
| 26 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 26 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 27 import 'package:typed_mock/typed_mock.dart'; | |
| 28 | 27 |
| 29 main() { | 28 main() { |
| 30 defineReflectiveSuite(() { | 29 defineReflectiveSuite(() { |
| 31 defineReflectiveTests(AnalysisOptionsImplTest); | 30 defineReflectiveTests(AnalysisOptionsImplTest); |
| 32 defineReflectiveTests(SourcesChangedEventTest); | 31 defineReflectiveTests(SourcesChangedEventTest); |
| 33 }); | 32 }); |
| 34 } | 33 } |
| 35 | 34 |
| 36 @reflectiveTest | 35 @reflectiveTest |
| 37 class AnalysisOptionsImplTest { | 36 class AnalysisOptionsImplTest { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void onData(ImplicitAnalysisEvent event) { | 125 void onData(ImplicitAnalysisEvent event) { |
| 127 actualEvents.add(event); | 126 actualEvents.add(event); |
| 128 if (event.isAnalyzed) { | 127 if (event.isAnalyzed) { |
| 129 analyzedSources.add(event.source); | 128 analyzedSources.add(event.source); |
| 130 } else { | 129 } else { |
| 131 analyzedSources.remove(event.source); | 130 analyzedSources.remove(event.source); |
| 132 } | 131 } |
| 133 } | 132 } |
| 134 } | 133 } |
| 135 | 134 |
| 136 class CompilationUnitMock extends TypedMock implements CompilationUnit {} | |
| 137 | |
| 138 class MockSourceFactory extends SourceFactoryImpl { | 135 class MockSourceFactory extends SourceFactoryImpl { |
| 139 MockSourceFactory() : super([]); | 136 MockSourceFactory() : super([]); |
| 140 Source resolveUri(Source containingSource, String containedUri) { | 137 Source resolveUri(Source containingSource, String containedUri) { |
| 141 throw new UnimplementedError(); | 138 throw new UnimplementedError(); |
| 142 } | 139 } |
| 143 } | 140 } |
| 144 | 141 |
| 145 @reflectiveTest | 142 @reflectiveTest |
| 146 class SourcesChangedEventTest { | 143 class SourcesChangedEventTest { |
| 147 void test_added() { | 144 void test_added() { |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 @override | 760 @override |
| 764 void test_flushAstStructures(Source source) { | 761 void test_flushAstStructures(Source source) { |
| 765 fail("Unexpected invocation of test_flushAstStructures"); | 762 fail("Unexpected invocation of test_flushAstStructures"); |
| 766 } | 763 } |
| 767 | 764 |
| 768 @override | 765 @override |
| 769 void visitContentCache(ContentCacheVisitor visitor) { | 766 void visitContentCache(ContentCacheVisitor visitor) { |
| 770 fail("Unexpected invocation of visitContentCache"); | 767 fail("Unexpected invocation of visitContentCache"); |
| 771 } | 768 } |
| 772 } | 769 } |
| OLD | NEW |