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

Unified Diff: pkg/analyzer/test/src/task/options_test.dart

Issue 1441323003: Strong Mode option value validation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « pkg/analyzer/lib/src/task/options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/options_test.dart
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index 6c734c4bace0eacb9e3a832a5f912eb024544a97..75c0a5a890339a34270c384d88437d4a9727fc21 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -41,6 +41,14 @@ class ContextConfigurationTest extends AbstractContextTest {
Map<String, YamlNode> parseOptions(String source) =>
optionsProvider.getOptionsFromString(source);
+ test_configure_bad_options_contents() {
+ configureContext('''
+analyzer:
+ strong-mode:true # misformatted
+''');
+ expect(analysisOptions.strongMode, false);
+ }
+
test_configure_enableGenericMethods() {
expect(analysisOptions.enableGenericMethods, false);
configureContext('''
@@ -101,14 +109,6 @@ analyzer:
''');
expect(analysisOptions.strongMode, false);
}
-
- test_configure_bad_options_contents() {
- configureContext('''
-analyzer:
- strong-mode:true # misformatted
-''');
- expect(analysisOptions.strongMode, false);
- }
}
@reflectiveTest
@@ -303,6 +303,15 @@ analyzer:
[]);
}
+ test_analyzer_supported_strong_mode_supported_bad_value() {
+ validate(
+ '''
+analyzer:
+ strong-mode: w00t
+ ''',
+ [AnalysisOptionsWarningCode.UNSUPPORTED_VALUE]);
+ }
+
test_analyzer_unsupported_option() {
validate(
'''
« no previous file with comments | « pkg/analyzer/lib/src/task/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698