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

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

Issue 2820893002: Make the analysis server integration tests driver only. (Closed)
Patch Set: uncomment test code Created 3 years, 8 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 @reflectiveTest
22 * Base class for testing the "analysis.getErrors" request. 21 class GetErrorsTest extends AbstractAnalysisServerIntegrationTest {
23 */
24 class AnalysisDomainGetErrorsTest
25 extends AbstractAnalysisServerIntegrationTest {
26 AnalysisDomainGetErrorsTest();
27
28 test_getErrors() { 22 test_getErrors() {
29 String pathname = sourcePath('test.dart'); 23 String pathname = sourcePath('test.dart');
30 String text = r''' 24 String text = r'''
31 main() { 25 main() {
32 var x // parse error: missing ';' 26 var x // parse error: missing ';'
33 }'''; 27 }''';
34 writeFile(pathname, text); 28 writeFile(pathname, text);
35 standardAnalysisSetup(); 29 standardAnalysisSetup();
36 Future finishTest() { 30 Future finishTest() {
37 return sendAnalysisGetErrors(pathname).then((result) { 31 return sendAnalysisGetErrors(pathname).then((result) {
38 expect(result.errors, equals(currentAnalysisErrors[pathname])); 32 expect(result.errors, equals(currentAnalysisErrors[pathname]));
39 }); 33 });
40 } 34 }
41 35
42 return analysisFinished.then((_) => finishTest()); 36 return analysisFinished.then((_) => finishTest());
43 } 37 }
44 } 38 }
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