Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: pkg/analysis_server/test/services/search/search_engine2_test.dart

Issue 2653683004: Stop using SDK summary bundle. Analyze dart:xxx as any other libraries. (Closed)
Patch Set: Restore optional SDK bundle. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/services/search/search_engine2_test.dart
diff --git a/pkg/analysis_server/test/services/search/search_engine2_test.dart b/pkg/analysis_server/test/services/search/search_engine2_test.dart
index 5d59461d70a5b490a479a236b0580910f3e6e1fc..572790e820255143c63b8da3e39da854153410f0 100644
--- a/pkg/analysis_server/test/services/search/search_engine2_test.dart
+++ b/pkg/analysis_server/test/services/search/search_engine2_test.dart
@@ -13,6 +13,7 @@ import 'package:analyzer/src/dart/analysis/byte_store.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:analyzer/src/dart/analysis/file_state.dart';
import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -27,9 +28,8 @@ main() {
@reflectiveTest
class SearchEngineImpl2Test {
- static final MockSdk sdk = new MockSdk();
-
final MemoryResourceProvider provider = new MemoryResourceProvider();
+ DartSdk sdk;
final ByteStore byteStore = new MemoryByteStore();
final FileContentOverlay contentOverlay = new FileContentOverlay();
@@ -39,6 +39,7 @@ class SearchEngineImpl2Test {
AnalysisDriverScheduler scheduler;
void setUp() {
+ sdk = new MockSdk(resourceProvider: provider);
logger = new PerformanceLog(logBuffer);
scheduler = new AnalysisDriverScheduler(logger);
scheduler.start();
@@ -262,7 +263,8 @@ get b => 42;
var searchEngine = new SearchEngineImpl2([driver1, driver2]);
List<SearchMatch> matches =
await searchEngine.searchTopLevelDeclarations('.*');
- expect(matches, hasLength(4));
+ expect(
+ matches.where((match) => !match.libraryElement.isInSdk), hasLength(4));
void assertHasElement(String name) {
expect(
« no previous file with comments | « pkg/analysis_server/test/services/refactoring/move_file_test.dart ('k') | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698