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

Unified Diff: pkg/analyzer_cli/test/reporter_test.dart

Issue 1811753002: Revert "Directory support for the analyzer CLI (#25129)." [TBR] (Closed) Base URL: git@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
« no previous file with comments | « pkg/analyzer_cli/lib/src/package_analyzer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/reporter_test.dart
diff --git a/pkg/analyzer_cli/test/reporter_test.dart b/pkg/analyzer_cli/test/reporter_test.dart
index 3a0853bdf6b467342e520e5570d59a29ff4e3ffd..94b089649b32ebbefd2cdccec493afcfeefe0e1b 100644
--- a/pkg/analyzer_cli/test/reporter_test.dart
+++ b/pkg/analyzer_cli/test/reporter_test.dart
@@ -14,9 +14,7 @@ import 'mocks.dart';
main() {
group('reporter', () {
var out = new StringBuffer();
- var stats = new AnalysisStats();
- setUp(() => stats.init());
tearDown(() => out.clear());
// Options
@@ -25,32 +23,28 @@ main() {
when(options.hintsAreFatal).thenReturn(false);
when(options.machineFormat).thenReturn(false);
- var reporter = new ErrorFormatter(out, options, stats);
+ var reporter = new ErrorFormatter(out, options);
test('error', () {
var error = mockError(ErrorType.SYNTACTIC_ERROR, ErrorSeverity.ERROR);
reporter.formatErrors([error]);
- expect(out.toString().trim(),
- '[error] MSG (/foo/bar/baz.dart, line 3, col 3)');
+ expect(
+ out.toString(),
+ '''[error] MSG (/foo/bar/baz.dart, line 3, col 3)
+1 error found.
+''');
});
test('hint', () {
var error = mockError(ErrorType.HINT, ErrorSeverity.INFO);
reporter.formatErrors([error]);
- expect(out.toString().trim(),
- '[hint] MSG (/foo/bar/baz.dart, line 3, col 3)');
- });
-
- test('stats', () {
- var error = mockError(ErrorType.HINT, ErrorSeverity.INFO);
- reporter.formatErrors([error]);
- stats.print(out);
expect(
- out.toString().trim(),
+ out.toString(),
'''[hint] MSG (/foo/bar/baz.dart, line 3, col 3)
-1 hint found.''');
+1 hint found.
+''');
});
});
}
« no previous file with comments | « pkg/analyzer_cli/lib/src/package_analyzer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698