Index: pkg/analyzer/test/generated/all_the_rest_test.dart |
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart |
index 33db261181f126587dc982b4fbfe2dac20310c04..8476223be7c4dbf80c431f64059162b5e34a0f60 100644 |
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart |
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart |
@@ -155,6 +155,24 @@ class DirectoryBasedDartSdkTest { |
expect(docFile, isNotNull); |
} |
+ void test_analysisOptions_afterContextCreation() { |
+ DirectoryBasedDartSdk sdk = _createDartSdk(); |
+ sdk.context; |
+ expect(() { |
+ sdk.analysisOptions = new AnalysisOptionsImpl(); |
+ }, throwsStateError); |
+ } |
+ |
+ void test_analysisOptions_beforeContextCreation() { |
+ DirectoryBasedDartSdk sdk = _createDartSdk(); |
+ sdk.analysisOptions = new AnalysisOptionsImpl(); |
+ sdk.context; |
+ // cannot change "analysisOptions" in the context |
+ expect(() { |
+ sdk.context.analysisOptions = new AnalysisOptionsImpl(); |
+ }, throwsStateError); |
+ } |
+ |
void test_creation() { |
DirectoryBasedDartSdk sdk = _createDartSdk(); |
expect(sdk, isNotNull); |
@@ -262,6 +280,20 @@ class DirectoryBasedDartSdkTest { |
expect(executable.isExecutable(), isTrue); |
} |
+ void test_useSummary_afterContextCreation() { |
+ DirectoryBasedDartSdk sdk = _createDartSdk(); |
+ sdk.context; |
+ expect(() { |
+ sdk.useSummary = true; |
+ }, throwsStateError); |
+ } |
+ |
+ void test_useSummary_beforeContextCreation() { |
+ DirectoryBasedDartSdk sdk = _createDartSdk(); |
+ sdk.useSummary = true; |
+ sdk.context; |
+ } |
+ |
DirectoryBasedDartSdk _createDartSdk() { |
JavaFile sdkDirectory = DirectoryBasedDartSdk.defaultSdkDirectory; |
expect(sdkDirectory, isNotNull, |