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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 1838453002: Use shared MockSdk instances in resynthesize tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/analyzer/test/src/summary/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index f23f3adb2725b3d4b24e8b378966a98372e12426..4bea0aedb8f580c9c7aed4d36d64c0f7f3ebe52b 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -19,6 +19,7 @@ import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/resolver.dart'
show Namespace, TypeProvider;
+import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/testing/ast_factory.dart';
import 'package:analyzer/src/summary/idl.dart';
@@ -29,6 +30,7 @@ import 'package:unittest/unittest.dart';
import '../../generated/test_support.dart';
import '../../reflective_tests.dart';
import '../abstract_single_unit.dart';
+import '../context/abstract_context.dart';
import 'summary_common.dart' show canonicalize;
main() {
@@ -111,8 +113,8 @@ class ResynthesizeElementTest extends ResynthesizeTest {
print('Linked $path: ${JSON.encode(canonicalize(lib))}');
});
}
- return new TestSummaryResynthesizer(null, context, unlinkedSummaries,
- linkedSummaries);
+ return new TestSummaryResynthesizer(
+ null, context, unlinkedSummaries, linkedSummaries);
}
/**
@@ -1148,6 +1150,8 @@ abstract class ResynthesizeTest extends AbstractSingleUnitTest {
checkPossibleLocalElements(resynthesized, original);
}
+ DartSdk createDartSdk() => AbstractContextTest.SHARED_MOCK_SDK;
+
/**
* Determine the analysis options that should be used for this test.
*/
@@ -1213,8 +1217,8 @@ abstract class ResynthesizeTest extends AbstractSingleUnitTest {
print('Linked $path: ${JSON.encode(canonicalize(lib))}');
});
}
- return new TestSummaryResynthesizer(null, context, unlinkedSummaries,
- linkedSummaries);
+ return new TestSummaryResynthesizer(
+ null, context, unlinkedSummaries, linkedSummaries);
}
fail_library_hasExtUri() {

Powered by Google App Engine
This is Rietveld 408576698