Index: pkg/analysis_server/test/abstract_context.dart |
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart |
index e3c4b93508e4d74bdf0e32d153e602c63efb2595..e139528d04391925c257d771aa1c52ee2607c732 100644 |
--- a/pkg/analysis_server/test/abstract_context.dart |
+++ b/pkg/analysis_server/test/abstract_context.dart |
@@ -76,6 +76,20 @@ class AbstractContextTest { |
*/ |
bool get enableNewAnalysisDriver => false; |
+ Source addMetaPackageSource() => addPackageSource( |
+ 'meta', |
+ 'meta.dart', |
+ r''' |
+library meta; |
+ |
+const Required required = const Required(); |
+ |
+class Required { |
+ final String reason; |
+ const Required([this.reason]); |
+} |
+'''); |
+ |
Source addPackageSource(String packageName, String filePath, String content) { |
packageMap[packageName] = [(newFolder('/pubcache/$packageName'))]; |
File file = newFile('/pubcache/$packageName/$filePath', content); |