| Index: pkg/analyzer/test/src/context/builder_test.dart
|
| diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart
|
| index b05daa5240fa47b4906d6e9560c70d844c250714..8a40454ad61b73cee2dfae54efb98a382a449f15 100644
|
| --- a/pkg/analyzer/test/src/context/builder_test.dart
|
| +++ b/pkg/analyzer/test/src/context/builder_test.dart
|
| @@ -555,6 +555,63 @@ analyzer:
|
| }
|
| }
|
|
|
| + void test_getAnalysisOptions_includes() {
|
| + AnalysisOptionsImpl defaultOptions = new AnalysisOptionsImpl();
|
| + defaultOptions.enableGenericMethods = true;
|
| + builderOptions.defaultOptions = defaultOptions;
|
| + AnalysisOptionsImpl expected = new AnalysisOptionsImpl();
|
| + expected.enableSuperMixins = true;
|
| + expected.enableGenericMethods = true;
|
| + resourceProvider.newFile(
|
| + resourceProvider.convertPath('/mypkgs/somepkg/lib/here.yaml'),
|
| + '''
|
| +two: {boo: newt}
|
| +''');
|
| + String path = resourceProvider.convertPath('/some/directory/path');
|
| + resourceProvider.newFile(
|
| + pathContext.join(path, '.packages'),
|
| + '''
|
| +somepkg:/mypkgs/somepkg/lib
|
| +''');
|
| + resourceProvider.newFile(
|
| + pathContext.join(path, 'bar.yaml'),
|
| + '''
|
| +include: package:somepkg/here.yaml
|
| +foo: {bar: baz}
|
| +''');
|
| + String filePath =
|
| + pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
|
| + resourceProvider.newFile(
|
| + filePath,
|
| + '''
|
| +include: bar.yaml
|
| +analyzer:
|
| + language:
|
| + enableSuperMixins : true
|
| +''');
|
| +
|
| + AnalysisEngine engine = AnalysisEngine.instance;
|
| + OptionsPlugin plugin = engine.optionsPlugin;
|
| + plugin.registerExtensionPoints((_) {});
|
| + try {
|
| + _TestOptionsProcessor processor = new _TestOptionsProcessor();
|
| + processor.expectedOptions = <String, Object>{
|
| + 'analyzer': {
|
| + 'language': {'enableSuperMixins': true}
|
| + },
|
| + 'foo': {'bar': 'baz'},
|
| + 'two': {'boo': 'newt'},
|
| + };
|
| + (plugin.optionsProcessorExtensionPoint as ExtensionPointImpl)
|
| + .add(processor);
|
| + AnalysisContext context = engine.createAnalysisContext();
|
| + AnalysisOptions options = builder.getAnalysisOptions(context, path);
|
| + _expectEqualOptions(options, expected);
|
| + } finally {
|
| + plugin.registerExtensionPoints((_) {});
|
| + }
|
| + }
|
| +
|
| void test_getAnalysisOptions_invalid() {
|
| String path = resourceProvider.convertPath('/some/directory/path');
|
| String filePath =
|
|
|