| 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 test.integration.analysis.analysis_options_test; | |
| 6 | |
| 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 5 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 8 import 'package:analyzer/src/generated/engine.dart'; | 6 import 'package:analyzer/src/generated/engine.dart'; |
| 9 import 'package:test/test.dart'; | 7 import 'package:test/test.dart'; |
| 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 8 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 11 | 9 |
| 12 import '../integration_tests.dart'; | 10 import '../integration_tests.dart'; |
| 13 | 11 |
| 14 main() { | 12 main() { |
| 15 defineReflectiveSuite(() { | 13 defineReflectiveSuite(() { |
| 16 defineReflectiveTests(OptionsIntegrationTest); | 14 defineReflectiveTests(OptionsIntegrationTest); |
| 15 defineReflectiveTests(OptionsIntegrationTest_Driver); |
| 17 }); | 16 }); |
| 18 } | 17 } |
| 19 | 18 |
| 20 @reflectiveTest | 19 class AbstractOptionsIntegrationTest |
| 21 class OptionsIntegrationTest extends AbstractAnalysisServerIntegrationTest { | 20 extends AbstractAnalysisServerIntegrationTest { |
| 22 test_option_warning_newOptionFile() async { | 21 test_option_warning_newOptionFile() async { |
| 23 String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE); | 22 String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE); |
| 24 writeFile( | 23 writeFile( |
| 25 options, | 24 options, |
| 26 ''' | 25 ''' |
| 27 linter: | 26 linter: |
| 28 rules: | 27 rules: |
| 29 - camel_case_typo # :) | 28 - camel_case_typo # :) |
| 30 '''); | 29 '''); |
| 31 | 30 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 AnalysisError error = errors[0]; | 65 AnalysisError error = errors[0]; |
| 67 expect(error.location.file, options); | 66 expect(error.location.file, options); |
| 68 expect(error.severity, AnalysisErrorSeverity.WARNING); | 67 expect(error.severity, AnalysisErrorSeverity.WARNING); |
| 69 expect(error.type, AnalysisErrorType.STATIC_WARNING); | 68 expect(error.type, AnalysisErrorType.STATIC_WARNING); |
| 70 expect(error.location.offset, 23); | 69 expect(error.location.offset, 23); |
| 71 expect(error.location.length, 'camel_case_typo'.length); | 70 expect(error.location.length, 'camel_case_typo'.length); |
| 72 expect(error.location.startLine, 3); | 71 expect(error.location.startLine, 3); |
| 73 expect(error.location.startColumn, 7); | 72 expect(error.location.startColumn, 7); |
| 74 } | 73 } |
| 75 } | 74 } |
| 75 |
| 76 @reflectiveTest |
| 77 class OptionsIntegrationTest extends AbstractOptionsIntegrationTest {} |
| 78 |
| 79 @reflectiveTest |
| 80 class OptionsIntegrationTest_Driver extends AbstractOptionsIntegrationTest { |
| 81 @override |
| 82 bool get enableNewAnalysisDriver => true; |
| 83 |
| 84 @failingTest |
| 85 test_option_warning_newOptionFile() async { |
| 86 // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds. |
| 87 //return super.test_option_warning_newOptionFile(); |
| 88 fail('Test timed out'); |
| 89 } |
| 90 |
| 91 @failingTest |
| 92 test_option_warning_oldOptionFile() async { |
| 93 // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds. |
| 94 //return super.test_option_warning_oldOptionFile(); |
| 95 fail('Test timed out'); |
| 96 } |
| 97 } |
| OLD | NEW |