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

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

Issue 1437703003: Improves options validation type safety (#24885). (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/test/source/analysis_options_provider_test.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 5185e9b68eb98d3bf03bf300c74b8c1bd25b5e3d..6c734c4bace0eacb9e3a832a5f912eb024544a97 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -93,6 +93,22 @@ analyzer:
''');
expect(analysisOptions.strongMode, true);
}
+
+ test_configure_strong_mode_bad_value() {
+ configureContext('''
+analyzer:
+ strong-mode: foo
+''');
+ expect(analysisOptions.strongMode, false);
+ }
+
+ test_configure_bad_options_contents() {
+ configureContext('''
+analyzer:
+ strong-mode:true # misformatted
+''');
+ expect(analysisOptions.strongMode, false);
+ }
}
@reflectiveTest
« no previous file with comments | « pkg/analyzer/test/source/analysis_options_provider_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698