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

Side by Side Diff: pkg/analysis_server/test/integration/analysis/analysis_options_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) 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 import 'package:analyzer/src/generated/engine.dart'; 5 import 'package:analyzer/src/generated/engine.dart';
6 import 'package:analyzer_plugin/protocol/protocol_common.dart'; 6 import 'package:analyzer_plugin/protocol/protocol_common.dart';
7 import 'package:test/test.dart'; 7 import 'package:test/test.dart';
8 import 'package:test_reflective_loader/test_reflective_loader.dart'; 8 import 'package:test_reflective_loader/test_reflective_loader.dart';
9 9
10 import '../support/integration_tests.dart'; 10 import '../support/integration_tests.dart';
11 11
12 main() { 12 main() {
13 defineReflectiveSuite(() { 13 defineReflectiveSuite(() {
14 defineReflectiveTests(OptionsIntegrationTest); 14 defineReflectiveTests(OptionsIntegrationTest);
15 }); 15 });
16 } 16 }
17 17
18 @reflectiveTest 18 @reflectiveTest
19 class OptionsIntegrationTest extends AbstractAnalysisServerIntegrationTest { 19 class OptionsIntegrationTest extends AbstractAnalysisServerIntegrationTest {
20 @failingTest 20 @failingTest
21 test_option_warning_newOptionFile() async { 21 test_option_warning_newOptionFile() async {
22 // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds 22 // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds
23 // (#28868). 23 // (#28868).
24 24
25 fail('test timeout expected - #28868'); 25 fail('test timeout expected - #28868');
26 26
27 String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE); 27 String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
28 writeFile( 28 writeFile(options, '''
29 options,
30 '''
31 linter: 29 linter:
32 rules: 30 rules:
33 - camel_case_typo # :) 31 - camel_case_typo # :)
34 '''); 32 ''');
35 33
36 standardAnalysisSetup(); 34 standardAnalysisSetup();
37 35
38 await analysisFinished; 36 await analysisFinished;
39 37
40 expect(currentAnalysisErrors[options], isList); 38 expect(currentAnalysisErrors[options], isList);
(...skipping 10 matching lines...) Expand all
51 } 49 }
52 50
53 @failingTest 51 @failingTest
54 test_option_warning_oldOptionFile() async { 52 test_option_warning_oldOptionFile() async {
55 // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds 53 // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds
56 // (#28868). 54 // (#28868).
57 55
58 fail('test timeout expected - #28868'); 56 fail('test timeout expected - #28868');
59 57
60 String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_FILE); 58 String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_FILE);
61 writeFile( 59 writeFile(options, '''
62 options,
63 '''
64 linter: 60 linter:
65 rules: 61 rules:
66 - camel_case_typo # :) 62 - camel_case_typo # :)
67 '''); 63 ''');
68 64
69 standardAnalysisSetup(); 65 standardAnalysisSetup();
70 66
71 await analysisFinished; 67 await analysisFinished;
72 68
73 expect(currentAnalysisErrors[options], isList); 69 expect(currentAnalysisErrors[options], isList);
74 List<AnalysisError> errors = currentAnalysisErrors[options]; 70 List<AnalysisError> errors = currentAnalysisErrors[options];
75 expect(errors, hasLength(1)); 71 expect(errors, hasLength(1));
76 AnalysisError error = errors[0]; 72 AnalysisError error = errors[0];
77 expect(error.location.file, options); 73 expect(error.location.file, options);
78 expect(error.severity, AnalysisErrorSeverity.WARNING); 74 expect(error.severity, AnalysisErrorSeverity.WARNING);
79 expect(error.type, AnalysisErrorType.STATIC_WARNING); 75 expect(error.type, AnalysisErrorType.STATIC_WARNING);
80 expect(error.location.offset, 23); 76 expect(error.location.offset, 23);
81 expect(error.location.length, 'camel_case_typo'.length); 77 expect(error.location.length, 'camel_case_typo'.length);
82 expect(error.location.startLine, 3); 78 expect(error.location.startLine, 3);
83 expect(error.location.startColumn, 7); 79 expect(error.location.startColumn, 7);
84 } 80 }
85 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698