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

Side by Side Diff: pkg/analysis_server/test/analysis/notification_errors_test.dart

Issue 2975253002: Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt. (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 'package:analysis_server/protocol/protocol.dart'; 5 import 'package:analysis_server/protocol/protocol.dart';
6 import 'package:analysis_server/protocol/protocol_constants.dart'; 6 import 'package:analysis_server/protocol/protocol_constants.dart';
7 import 'package:analysis_server/protocol/protocol_generated.dart'; 7 import 'package:analysis_server/protocol/protocol_generated.dart';
8 import 'package:analysis_server/src/context_manager.dart'; 8 import 'package:analysis_server/src/context_manager.dart';
9 import 'package:analysis_server/src/domain_analysis.dart'; 9 import 'package:analysis_server/src/domain_analysis.dart';
10 import 'package:analyzer/src/dart/analysis/driver.dart'; 10 import 'package:analyzer/src/dart/analysis/driver.dart';
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 expect(errors, hasLength(1)); 59 expect(errors, hasLength(1));
60 AnalysisError error = errors[0]; 60 AnalysisError error = errors[0];
61 expect(error.severity, AnalysisErrorSeverity.ERROR); 61 expect(error.severity, AnalysisErrorSeverity.ERROR);
62 expect(error.type, AnalysisErrorType.COMPILE_TIME_ERROR); 62 expect(error.type, AnalysisErrorType.COMPILE_TIME_ERROR);
63 expect(error.message, startsWith("Target of URI doesn't exist")); 63 expect(error.message, startsWith("Target of URI doesn't exist"));
64 } 64 }
65 65
66 test_lintError() async { 66 test_lintError() async {
67 var camelCaseTypesLintName = 'camel_case_types'; 67 var camelCaseTypesLintName = 'camel_case_types';
68 68
69 addFile( 69 addFile('$projectPath/.analysis_options', '''
70 '$projectPath/.analysis_options',
71 '''
72 linter: 70 linter:
73 rules: 71 rules:
74 - $camelCaseTypesLintName 72 - $camelCaseTypesLintName
75 '''); 73 ''');
76 74
77 addTestFile('class a { }'); 75 addTestFile('class a { }');
78 76
79 Request request = 77 Request request =
80 new AnalysisSetAnalysisRootsParams([projectPath], []).toRequest('0'); 78 new AnalysisSetAnalysisRootsParams([projectPath], []).toRequest('0');
81 handleSuccessfulRequest(request); 79 handleSuccessfulRequest(request);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 '''); 137 ''');
140 await waitForTasksFinished(); 138 await waitForTasksFinished();
141 await pumpEventQueue(); 139 await pumpEventQueue();
142 List<AnalysisError> errors = filesErrors[testFile]; 140 List<AnalysisError> errors = filesErrors[testFile];
143 expect(errors, hasLength(1)); 141 expect(errors, hasLength(1));
144 AnalysisError error = errors[0]; 142 AnalysisError error = errors[0];
145 expect(error.severity, AnalysisErrorSeverity.WARNING); 143 expect(error.severity, AnalysisErrorSeverity.WARNING);
146 expect(error.type, AnalysisErrorType.STATIC_WARNING); 144 expect(error.type, AnalysisErrorType.STATIC_WARNING);
147 } 145 }
148 } 146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698