| 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/source/embedder.dart'; | 11 import 'package:analyzer/source/embedder.dart'; |
| 12 import 'package:analyzer/src/context/cache.dart'; | 12 import 'package:analyzer/src/context/cache.dart'; |
| 13 import 'package:analyzer/src/context/context.dart'; | 13 import 'package:analyzer/src/context/context.dart'; |
| 14 import 'package:analyzer/src/context/source.dart'; |
| 14 import 'package:analyzer/src/generated/constant.dart'; | 15 import 'package:analyzer/src/generated/constant.dart'; |
| 15 import 'package:analyzer/src/generated/engine.dart'; | 16 import 'package:analyzer/src/generated/engine.dart'; |
| 16 import 'package:analyzer/src/generated/error.dart'; | 17 import 'package:analyzer/src/generated/error.dart'; |
| 17 import 'package:analyzer/src/generated/java_core.dart'; | 18 import 'package:analyzer/src/generated/java_core.dart'; |
| 18 import 'package:analyzer/src/generated/resolver.dart'; | 19 import 'package:analyzer/src/generated/resolver.dart'; |
| 19 import 'package:analyzer/src/generated/source_io.dart'; | 20 import 'package:analyzer/src/generated/source_io.dart'; |
| 20 import 'package:analyzer/src/string_source.dart'; | 21 import 'package:analyzer/src/string_source.dart'; |
| 21 import 'package:analyzer/task/model.dart'; | 22 import 'package:analyzer/task/model.dart'; |
| 22 import 'package:html/dom.dart' show Document; | 23 import 'package:html/dom.dart' show Document; |
| 23 import 'package:typed_mock/typed_mock.dart'; | 24 import 'package:typed_mock/typed_mock.dart'; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 if (event.isAnalyzed) { | 69 if (event.isAnalyzed) { |
| 69 analyzedSources.add(event.source); | 70 analyzedSources.add(event.source); |
| 70 } else { | 71 } else { |
| 71 analyzedSources.remove(event.source); | 72 analyzedSources.remove(event.source); |
| 72 } | 73 } |
| 73 } | 74 } |
| 74 } | 75 } |
| 75 | 76 |
| 76 class CompilationUnitMock extends TypedMock implements CompilationUnit {} | 77 class CompilationUnitMock extends TypedMock implements CompilationUnit {} |
| 77 | 78 |
| 78 class MockSourceFactory extends SourceFactory { | 79 class MockSourceFactory extends SourceFactoryImpl { |
| 79 MockSourceFactory() : super([]); | 80 MockSourceFactory() : super([]); |
| 80 Source resolveUri(Source containingSource, String containedUri) { | 81 Source resolveUri(Source containingSource, String containedUri) { |
| 81 throw new JavaIOException(); | 82 throw new JavaIOException(); |
| 82 } | 83 } |
| 83 } | 84 } |
| 84 | 85 |
| 85 @reflectiveTest | 86 @reflectiveTest |
| 86 class SourcesChangedEventTest { | 87 class SourcesChangedEventTest { |
| 87 void test_added() { | 88 void test_added() { |
| 88 var source = new StringSource('', '/test.dart'); | 89 var source = new StringSource('', '/test.dart'); |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 bool validateCacheConsistency() { | 678 bool validateCacheConsistency() { |
| 678 fail("Unexpected invocation of validateCacheConsistency"); | 679 fail("Unexpected invocation of validateCacheConsistency"); |
| 679 return false; | 680 return false; |
| 680 } | 681 } |
| 681 | 682 |
| 682 @override | 683 @override |
| 683 void visitContentCache(ContentCacheVisitor visitor) { | 684 void visitContentCache(ContentCacheVisitor visitor) { |
| 684 fail("Unexpected invocation of visitContentCache"); | 685 fail("Unexpected invocation of visitContentCache"); |
| 685 } | 686 } |
| 686 } | 687 } |
| OLD | NEW |