| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:io'; | 5 import 'dart:io'; |
| 6 | 6 |
| 7 import 'package:analyzer_cli/src/driver.dart'; | 7 import 'package:analyzer_cli/src/analyzer_driver.dart'; |
| 8 import 'package:analyzer_cli/src/options.dart'; | 8 import 'package:analyzer_cli/src/analyzer_options.dart'; |
| 9 import 'package:path/path.dart' as path; | 9 import 'package:path/path.dart' as path; |
| 10 import 'package:test/test.dart'; | 10 import 'package:test/test.dart'; |
| 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 12 | 12 |
| 13 import 'utils.dart'; | 13 import 'utils.dart'; |
| 14 | 14 |
| 15 main() { | 15 main() { |
| 16 defineReflectiveTests(ErrorsReportedOnceTest); | 16 defineReflectiveTests(ErrorsReportedOnceTest); |
| 17 } | 17 } |
| 18 | 18 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 47 | 47 |
| 48 expect(exitCode, 0); | 48 expect(exitCode, 0); |
| 49 | 49 |
| 50 // Ensure that we only have one copy of the error. | 50 // Ensure that we only have one copy of the error. |
| 51 final String unusedWarning = 'Unused import'; | 51 final String unusedWarning = 'Unused import'; |
| 52 String output = outSink.toString(); | 52 String output = outSink.toString(); |
| 53 expect(output, contains(unusedWarning)); | 53 expect(output, contains(unusedWarning)); |
| 54 expect(unusedWarning.allMatches(output).toList(), hasLength(1)); | 54 expect(unusedWarning.allMatches(output).toList(), hasLength(1)); |
| 55 } | 55 } |
| 56 } | 56 } |
| OLD | NEW |