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

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

Issue 2710193002: Update the analysis server integration tests to always run on the analysis driver. (Closed)
Patch Set: Created 3 years, 10 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 library test.integration.analysis.get.errors; 5 library test.integration.analysis.get.errors;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:test/test.dart'; 9 import 'package:test/test.dart';
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; 10 import 'package:test_reflective_loader/test_reflective_loader.dart';
11 11
12 import '../integration_tests.dart'; 12 import '../integration_tests.dart';
13 13
14 main() { 14 main() {
15 defineReflectiveSuite(() { 15 defineReflectiveSuite(() {
16 defineReflectiveTests(GetErrorsTest); 16 defineReflectiveTests(GetErrorsTest);
17 defineReflectiveTests(GetErrorsTest_Driver);
18 }); 17 });
19 } 18 }
20 19
21 /** 20 /**
22 * Base class for testing the "analysis.getErrors" request. 21 * Base class for testing the "analysis.getErrors" request.
23 */ 22 */
24 class AnalysisDomainGetErrorsTest 23 @reflectiveTest
25 extends AbstractAnalysisServerIntegrationTest { 24 class GetErrorsTest extends AbstractAnalysisServerIntegrationTest {
26 AnalysisDomainGetErrorsTest(); 25 GetErrorsTest();
27 26
28 test_getErrors() { 27 test_getErrors() {
29 String pathname = sourcePath('test.dart'); 28 String pathname = sourcePath('test.dart');
30 String text = r''' 29 String text = r'''
31 main() { 30 main() {
32 var x // parse error: missing ';' 31 var x // parse error: missing ';'
33 }'''; 32 }''';
34 writeFile(pathname, text); 33 writeFile(pathname, text);
35 standardAnalysisSetup(); 34 standardAnalysisSetup();
36 Future finishTest() { 35 Future finishTest() {
37 return sendAnalysisGetErrors(pathname).then((result) { 36 return sendAnalysisGetErrors(pathname).then((result) {
38 expect(result.errors, equals(currentAnalysisErrors[pathname])); 37 expect(result.errors, equals(currentAnalysisErrors[pathname]));
39 }); 38 });
40 } 39 }
41 40
42 return analysisFinished.then((_) => finishTest()); 41 return analysisFinished.then((_) => finishTest());
43 } 42 }
44 } 43 }
45
46 @reflectiveTest
47 class GetErrorsTest extends AnalysisDomainGetErrorsTest {}
48
49 @reflectiveTest
50 class GetErrorsTest_Driver extends AnalysisDomainGetErrorsTest {
51 @override
52 bool get enableNewAnalysisDriver => true;
53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698