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 078f36da05fb46034dded2c145017cdab550084f..4fab7bd25ae74bec2cd585bd1d3249737507275a 100644 |
--- a/pkg/analyzer_cli/test/reporter_test.dart |
+++ b/pkg/analyzer_cli/test/reporter_test.dart |
@@ -5,6 +5,7 @@ |
library analyzer_cli.test.formatter; |
import 'package:analyzer/analyzer.dart'; |
+import 'package:analyzer_cli/src/ansi.dart' as ansi; |
import 'package:analyzer_cli/src/error_formatter.dart'; |
import 'package:test/test.dart' hide ErrorFormatter; |
import 'package:typed_mock/typed_mock.dart'; |
@@ -16,8 +17,15 @@ main() { |
var out = new StringBuffer(); |
var stats = new AnalysisStats(); |
- setUp(() => stats.init()); |
- tearDown(() => out.clear()); |
+ setUp(() { |
+ ansi.runningTests = true; |
+ stats.init(); |
+ }); |
+ |
+ tearDown(() { |
+ out.clear(); |
+ ansi.runningTests = false; |
+ }); |
// Options |
var options = new MockCommandLineOptions(); |
@@ -33,7 +41,7 @@ main() { |
reporter.formatErrors([error]); |
expect(out.toString().trim(), |
- '[error] MSG at /foo/bar/baz.dart:3:3 (mock_code).'); |
+ 'error • MSG at /foo/bar/baz.dart:3:3 • mock_code'); |
}); |
test('hint', () { |
@@ -41,7 +49,7 @@ main() { |
reporter.formatErrors([error]); |
expect(out.toString().trim(), |
- '[hint] MSG at /foo/bar/baz.dart:3:3 (mock_code).'); |
+ 'hint • MSG at /foo/bar/baz.dart:3:3 • mock_code'); |
}); |
test('stats', () { |
@@ -50,7 +58,7 @@ main() { |
stats.print(out); |
expect( |
out.toString().trim(), |
- '[hint] MSG at /foo/bar/baz.dart:3:3 (mock_code).\n' |
+ 'hint • MSG at /foo/bar/baz.dart:3:3 • mock_code\n' |
'1 hint found.'); |
}); |
}); |