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

Side by Side Diff: pkg/analyzer/test/generated/engine_test.dart

Issue 2988343002: Initial support for an explicit plugin list (Closed)
Patch Set: Created 3 years, 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/options.dart ('k') | pkg/analyzer/test/src/task/options_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.test.generated.engine_test; 5 library analyzer.test.generated.engine_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 @reflectiveTest 35 @reflectiveTest
36 class AnalysisOptionsImplTest { 36 class AnalysisOptionsImplTest {
37 test_resetToDefaults() { 37 test_resetToDefaults() {
38 // Note that this only tests options visible from the interface. 38 // Note that this only tests options visible from the interface.
39 AnalysisOptionsImpl defaultOptions = new AnalysisOptionsImpl(); 39 AnalysisOptionsImpl defaultOptions = new AnalysisOptionsImpl();
40 AnalysisOptionsImpl modifiedOptions = new AnalysisOptionsImpl(); 40 AnalysisOptionsImpl modifiedOptions = new AnalysisOptionsImpl();
41 modifiedOptions.dart2jsHint = true; 41 modifiedOptions.dart2jsHint = true;
42 modifiedOptions.disableCacheFlushing = true; 42 modifiedOptions.disableCacheFlushing = true;
43 modifiedOptions.enabledPluginNames = ['somePackage'];
43 modifiedOptions.enableAssertInitializer = true; 44 modifiedOptions.enableAssertInitializer = true;
44 modifiedOptions.enableLazyAssignmentOperators = true; 45 modifiedOptions.enableLazyAssignmentOperators = true;
45 modifiedOptions.enableStrictCallChecks = true; 46 modifiedOptions.enableStrictCallChecks = true;
46 modifiedOptions.enableSuperMixins = true; 47 modifiedOptions.enableSuperMixins = true;
47 modifiedOptions.enableTiming = true; 48 modifiedOptions.enableTiming = true;
48 modifiedOptions.enableUriInPartOf = true; 49 modifiedOptions.enableUriInPartOf = true;
49 modifiedOptions.errorProcessors = [null]; 50 modifiedOptions.errorProcessors = [null];
50 modifiedOptions.excludePatterns = ['a']; 51 modifiedOptions.excludePatterns = ['a'];
51 modifiedOptions.generateImplicitErrors = false; 52 modifiedOptions.generateImplicitErrors = false;
52 modifiedOptions.generateSdkErrors = true; 53 modifiedOptions.generateSdkErrors = true;
53 modifiedOptions.hint = false; 54 modifiedOptions.hint = false;
54 modifiedOptions.lint = true; 55 modifiedOptions.lint = true;
55 modifiedOptions.lintRules = [null]; 56 modifiedOptions.lintRules = [null];
56 modifiedOptions.patchPaths = { 57 modifiedOptions.patchPaths = {
57 'dart:core': ['/dart_core.patch.dart'] 58 'dart:core': ['/dart_core.patch.dart']
58 }; 59 };
59 modifiedOptions.preserveComments = false; 60 modifiedOptions.preserveComments = false;
60 modifiedOptions.strongMode = true; 61 modifiedOptions.strongMode = true;
61 modifiedOptions.trackCacheDependencies = false; 62 modifiedOptions.trackCacheDependencies = false;
62 63
63 modifiedOptions.resetToDefaults(); 64 modifiedOptions.resetToDefaults();
64 65
65 expect(modifiedOptions.dart2jsHint, defaultOptions.dart2jsHint); 66 expect(modifiedOptions.dart2jsHint, defaultOptions.dart2jsHint);
66 expect(modifiedOptions.disableCacheFlushing, 67 expect(modifiedOptions.disableCacheFlushing,
67 defaultOptions.disableCacheFlushing); 68 defaultOptions.disableCacheFlushing);
69 expect(modifiedOptions.enabledPluginNames, isEmpty);
68 expect(modifiedOptions.enableAssertInitializer, 70 expect(modifiedOptions.enableAssertInitializer,
69 defaultOptions.enableAssertInitializer); 71 defaultOptions.enableAssertInitializer);
70 expect(modifiedOptions.enableLazyAssignmentOperators, 72 expect(modifiedOptions.enableLazyAssignmentOperators,
71 defaultOptions.enableLazyAssignmentOperators); 73 defaultOptions.enableLazyAssignmentOperators);
72 expect(modifiedOptions.enableStrictCallChecks, 74 expect(modifiedOptions.enableStrictCallChecks,
73 defaultOptions.enableStrictCallChecks); 75 defaultOptions.enableStrictCallChecks);
74 expect(modifiedOptions.enableSuperMixins, defaultOptions.enableSuperMixins); 76 expect(modifiedOptions.enableSuperMixins, defaultOptions.enableSuperMixins);
75 expect(modifiedOptions.enableTiming, defaultOptions.enableTiming); 77 expect(modifiedOptions.enableTiming, defaultOptions.enableTiming);
76 expect(modifiedOptions.enableUriInPartOf, defaultOptions.enableUriInPartOf); 78 expect(modifiedOptions.enableUriInPartOf, defaultOptions.enableUriInPartOf);
77 expect(modifiedOptions.errorProcessors, defaultOptions.errorProcessors); 79 expect(modifiedOptions.errorProcessors, defaultOptions.errorProcessors);
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 @override 762 @override
761 void test_flushAstStructures(Source source) { 763 void test_flushAstStructures(Source source) {
762 fail("Unexpected invocation of test_flushAstStructures"); 764 fail("Unexpected invocation of test_flushAstStructures");
763 } 765 }
764 766
765 @override 767 @override
766 void visitContentCache(ContentCacheVisitor visitor) { 768 void visitContentCache(ContentCacheVisitor visitor) {
767 fail("Unexpected invocation of visitContentCache"); 769 fail("Unexpected invocation of visitContentCache");
768 } 770 }
769 } 771 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/options.dart ('k') | pkg/analyzer/test/src/task/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698