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

Side by Side Diff: pkg/analysis_server/test/integration/analysis/lint_test.dart

Issue 2564863003: Get all integration tests running with the new driver (Closed)
Patch Set: Created 4 years 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 library test.integration.analysis.lint;
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(LintIntegrationTest); 14 defineReflectiveTests(LintIntegrationTest);
15 defineReflectiveTests(LintIntegrationTest_Driver);
17 }); 16 });
18 } 17 }
19 18
20 @reflectiveTest 19 class AbstractLintIntegrationTest
21 class LintIntegrationTest extends AbstractAnalysisServerIntegrationTest { 20 extends AbstractAnalysisServerIntegrationTest {
22 test_no_lints_when_not_specified() async { 21 test_no_lints_when_not_specified() async {
23 String source = sourcePath('test.dart'); 22 String source = sourcePath('test.dart');
24 writeFile( 23 writeFile(
25 source, 24 source,
26 ''' 25 '''
27 class abc { // lint: not CamelCase (should get ignored though) 26 class abc { // lint: not CamelCase (should get ignored though)
28 }'''); 27 }''');
29 standardAnalysisSetup(); 28 standardAnalysisSetup();
30 29
31 await analysisFinished; 30 await analysisFinished;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 85
87 expect(currentAnalysisErrors[source], isList); 86 expect(currentAnalysisErrors[source], isList);
88 List<AnalysisError> errors = currentAnalysisErrors[source]; 87 List<AnalysisError> errors = currentAnalysisErrors[source];
89 expect(errors, hasLength(1)); 88 expect(errors, hasLength(1));
90 AnalysisError error = errors[0]; 89 AnalysisError error = errors[0];
91 expect(error.location.file, source); 90 expect(error.location.file, source);
92 expect(error.severity, AnalysisErrorSeverity.INFO); 91 expect(error.severity, AnalysisErrorSeverity.INFO);
93 expect(error.type, AnalysisErrorType.LINT); 92 expect(error.type, AnalysisErrorType.LINT);
94 } 93 }
95 } 94 }
95
96 @reflectiveTest
97 class LintIntegrationTest extends AbstractLintIntegrationTest {}
98
99 @reflectiveTest
100 class LintIntegrationTest_Driver extends AbstractLintIntegrationTest {
101 @override
102 bool get enableNewAnalysisDriver => true;
103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698