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

Side by Side Diff: pkg/analyzer_cli/test/errors_reported_once_test.dart

Issue 2793813002: Fix an issue with duplicate reported analysis errors. (Closed)
Patch Set: Merge branch 'master' into fix_duplicate_errors Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer_cli/lib/src/error_severity.dart ('k') | pkg/analyzer_cli/test/reporter_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/driver.dart';
8 import 'package:analyzer_cli/src/options.dart'; 8 import 'package:analyzer_cli/src/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';
(...skipping 21 matching lines...) Expand all
32 errorSink = new StringBuffer(); 32 errorSink = new StringBuffer();
33 } 33 }
34 34
35 void tearDown() { 35 void tearDown() {
36 outSink = savedOutSink; 36 outSink = savedOutSink;
37 errorSink = savedErrorSink; 37 errorSink = savedErrorSink;
38 exitCode = savedExitCode; 38 exitCode = savedExitCode;
39 exitHandler = savedExitHandler; 39 exitHandler = savedExitHandler;
40 } 40 }
41 41
42 @failingTest // #25697
43 test_once() async { 42 test_once() async {
44 String testDir = path.join(testDirectory, 'data', 'errors_reported_once'); 43 String testDir = path.join(testDirectory, 'data', 'errors_reported_once');
45 Driver driver = new Driver(); 44 Driver driver = new Driver();
46 await driver.start( 45 await driver.start(
47 [path.join(testDir, 'foo.dart'), path.join(testDir, 'bar.dart')]); 46 [path.join(testDir, 'foo.dart'), path.join(testDir, 'bar.dart')]);
48 47
49 expect(exitCode, 0); 48 expect(exitCode, 0);
50 49
51 // Ensure that we only have one copy of the error. 50 // Ensure that we only have one copy of the error.
52 final String unusedWarning = 'Unused import'; 51 final String unusedWarning = 'Unused import';
53 String output = outSink.toString(); 52 String output = outSink.toString();
54 expect(output, contains(unusedWarning)); 53 expect(output, contains(unusedWarning));
55 expect(unusedWarning.allMatches(output).toList(), hasLength(1)); 54 expect(unusedWarning.allMatches(output).toList(), hasLength(1));
56 } 55 }
57 } 56 }
OLDNEW
« no previous file with comments | « pkg/analyzer_cli/lib/src/error_severity.dart ('k') | pkg/analyzer_cli/test/reporter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698