| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer_cli.test.formatter; | 5 library analyzer_cli.test.formatter; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer_cli/src/error_formatter.dart'; | 8 import 'package:analyzer_cli/src/error_formatter.dart'; |
| 9 import 'package:test/test.dart' hide ErrorFormatter; |
| 9 import 'package:typed_mock/typed_mock.dart'; | 10 import 'package:typed_mock/typed_mock.dart'; |
| 10 import 'package:unittest/unittest.dart' hide ErrorFormatter; | |
| 11 | 11 |
| 12 import 'mocks.dart'; | 12 import 'mocks.dart'; |
| 13 | 13 |
| 14 main() { | 14 main() { |
| 15 group('reporter', () { | 15 group('reporter', () { |
| 16 var out = new StringBuffer(); | 16 var out = new StringBuffer(); |
| 17 var stats = new AnalysisStats(); | 17 var stats = new AnalysisStats(); |
| 18 | 18 |
| 19 setUp(() => stats.init()); | 19 setUp(() => stats.init()); |
| 20 tearDown(() => out.clear()); | 20 tearDown(() => out.clear()); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 when(code.name).thenReturn('mock_code'); | 73 when(code.name).thenReturn('mock_code'); |
| 74 when(error.errorCode).thenReturn(code); | 74 when(error.errorCode).thenReturn(code); |
| 75 when(error.message).thenReturn('MSG'); | 75 when(error.message).thenReturn('MSG'); |
| 76 var source = new MockSource(); | 76 var source = new MockSource(); |
| 77 when(source.fullName).thenReturn('/foo/bar/baz.dart'); | 77 when(source.fullName).thenReturn('/foo/bar/baz.dart'); |
| 78 when(error.source).thenReturn(source); | 78 when(error.source).thenReturn(source); |
| 79 when(info.errors).thenReturn([error]); | 79 when(info.errors).thenReturn([error]); |
| 80 | 80 |
| 81 return info; | 81 return info; |
| 82 } | 82 } |
| OLD | NEW |