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

Side by Side Diff: pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:analysis_server/plugin/protocol/protocol.dart'; 8 import 'package:analysis_server/plugin/protocol/protocol.dart';
9 import 'package:analyzer/src/generated/sdk.dart'; 9 import 'package:analyzer/src/generated/sdk.dart';
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
11 import 'package:test/test.dart'; 11 import 'package:test/test.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; 12 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 13
14 import '../../mock_sdk.dart'; 14 import '../../mock_sdk.dart';
15 import '../integration_tests.dart'; 15 import '../integration_tests.dart';
16 16
17 main() { 17 main() {
18 defineReflectiveSuite(() { 18 defineReflectiveSuite(() {
19 defineReflectiveTests(AnalysisDomainGetErrorsTest); 19 defineReflectiveTests(AnalysisDomainGetErrorsTest);
20 defineReflectiveTests(AnalysisDomainGetErrorsTest_Driver);
21 }); 20 });
22 } 21 }
23 22
24 /** 23 /**
25 * Tests that when an SDK path is specified on the command-line (via the `--sdk` 24 * Tests that when an SDK path is specified on the command-line (via the `--sdk`
26 * argument) that the specified SDK is used. 25 * argument) that the specified SDK is used.
27 */ 26 */
28 class AbstractAnalysisDomainGetErrorsTest 27 @reflectiveTest
28 class AnalysisDomainGetErrorsTest
29 extends AbstractAnalysisServerIntegrationTest { 29 extends AbstractAnalysisServerIntegrationTest {
30 String createNonStandardSdk() { 30 String createNonStandardSdk() {
31 MockSdkLibrary fakeLibrary = 31 MockSdkLibrary fakeLibrary =
32 new MockSdkLibrary('dart:fake', '/lib/fake/fake.dart', ''); 32 new MockSdkLibrary('dart:fake', '/lib/fake/fake.dart', '');
33 String sdkPath = path.join(sourceDirectory.path, 'sdk'); 33 String sdkPath = path.join(sourceDirectory.path, 'sdk');
34 StringBuffer librariesContent = new StringBuffer(); 34 StringBuffer librariesContent = new StringBuffer();
35 librariesContent.writeln( 35 librariesContent.writeln(
36 'final Map<String, LibraryInfo> LIBRARIES = const <String, LibraryInfo> {'); 36 'final Map<String, LibraryInfo> LIBRARIES = const <String, LibraryInfo> {');
37 MockSdk.LIBRARIES.toList() 37 MockSdk.LIBRARIES.toList()
38 ..add(fakeLibrary) 38 ..add(fakeLibrary)
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 import 'dart:fake'; 86 import 'dart:fake';
87 '''; 87 ''';
88 writeFile(pathname, text); 88 writeFile(pathname, text);
89 standardAnalysisSetup(); 89 standardAnalysisSetup();
90 await analysisFinished; 90 await analysisFinished;
91 List<AnalysisError> errors = currentAnalysisErrors[pathname]; 91 List<AnalysisError> errors = currentAnalysisErrors[pathname];
92 expect(errors, hasLength(1)); 92 expect(errors, hasLength(1));
93 expect(errors[0].code, 'unused_import'); 93 expect(errors[0].code, 'unused_import');
94 } 94 }
95 } 95 }
96
97 @reflectiveTest
98 class AnalysisDomainGetErrorsTest extends AbstractAnalysisDomainGetErrorsTest {}
99
100 @reflectiveTest
101 class AnalysisDomainGetErrorsTest_Driver
102 extends AbstractAnalysisDomainGetErrorsTest {
103 @override
104 bool get enableNewAnalysisDriver => true;
105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698