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

Unified Diff: pkg/analyzer/test/source/error_processor_test.dart

Issue 1813973002: Don't upgrade the severity of *everything* to an error in strong mode. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/source/error_processor_test.dart
diff --git a/pkg/analyzer/test/source/error_processor_test.dart b/pkg/analyzer/test/source/error_processor_test.dart
index 864bbf84f57115c85c250dbae2af06195f8e8ed4..d7aaeee411ba2217144046341d9fa1f70f7d0773 100644
--- a/pkg/analyzer/test/source/error_processor_test.dart
+++ b/pkg/analyzer/test/source/error_processor_test.dart
@@ -39,6 +39,11 @@ main() {
['x']
]);
+ AnalysisError non_bool_operand = new AnalysisError(
+ new TestSource(), 0, 1, StaticTypeWarningCode.NON_BOOL_OPERAND, [
+ ['x']
+ ]);
+
oneTimeSetup();
setUp(() {
@@ -66,7 +71,15 @@ analyzer:
analyzer:
strong-mode: true
''');
- expect(getProcessor(invalid_assignment).severity, ErrorSeverity.ERROR);
+ expect(getProcessor(non_bool_operand).severity, ErrorSeverity.ERROR);
+ });
+
+ test('does not upgrade other warnings to errors in strong mode', () {
+ configureOptions('''
+analyzer:
+ strong-mode: true
+''');
+ expect(getProcessor(unused_local_variable), isNull);
});
});
« pkg/analyzer/lib/source/error_processor.dart ('K') | « pkg/analyzer/lib/source/error_processor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698