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

Unified Diff: test/reporter_test.dart

Issue 1382023002: Support for --fatal-hints. (Closed) Base URL: https://github.com/dart-lang/analyzer_cli.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « test/options_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/reporter_test.dart
diff --git a/test/reporter_test.dart b/test/reporter_test.dart
index 709a680ea4ef6e552fddf49e1b9e71122e71b33c..a68988999fdbf27a196817b020422e8fc3940ffd 100644
--- a/test/reporter_test.dart
+++ b/test/reporter_test.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
@TestOn("vm")
-
library analyzer_cli.test.formatter;
import 'package:analyzer/analyzer.dart';
@@ -24,6 +23,7 @@ main() {
when(options.disableHints).thenReturn(true);
when(options.enableTypeChecks).thenReturn(true);
when(options.machineFormat).thenReturn(false);
+ when(options.hintsAreFatal).thenReturn(false);
var reporter = new ErrorFormatter(out, options);
@@ -31,8 +31,8 @@ main() {
var error = mockError(ErrorType.SYNTACTIC_ERROR, ErrorSeverity.ERROR);
reporter.formatErrors([error]);
- expect(out.toString(), equals(
- '''[error] MSG (/foo/bar/baz.dart, line 3, col 3)
+ expect(out.toString(),
+ equals('''[error] MSG (/foo/bar/baz.dart, line 3, col 3)
1 error found.
'''));
});
@@ -41,8 +41,8 @@ main() {
var error = mockError(ErrorType.HINT, ErrorSeverity.INFO);
reporter.formatErrors([error]);
- expect(out.toString(), equals(
- '''[hint] MSG (/foo/bar/baz.dart, line 3, col 3)
+ expect(out.toString(),
+ equals('''[hint] MSG (/foo/bar/baz.dart, line 3, col 3)
1 hint found.
'''));
});
@@ -50,7 +50,6 @@ main() {
}
MockAnalysisErrorInfo mockError(ErrorType type, ErrorSeverity severity) {
-
// ErrorInfo
var info = new MockAnalysisErrorInfo();
var error = new MockAnalysisError();
« no previous file with comments | « test/options_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698