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

Side by Side Diff: pkg/analysis_server/test/domain_diagnostic_test.dart

Issue 1686613002: Use different SDKs based on option settings (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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) 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.domain.diagnostic; 5 library test.domain.diagnostic;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/plugin/protocol/protocol.dart';
8 import 'package:analysis_server/src/analysis_server.dart'; 8 import 'package:analysis_server/src/analysis_server.dart';
9 import 'package:analysis_server/src/domain_diagnostic.dart'; 9 import 'package:analysis_server/src/domain_diagnostic.dart';
10 import 'package:analysis_server/src/plugin/server_plugin.dart'; 10 import 'package:analysis_server/src/plugin/server_plugin.dart';
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // 46 //
47 var serverChannel = new MockServerChannel(); 47 var serverChannel = new MockServerChannel();
48 resourceProvider = new MemoryResourceProvider(); 48 resourceProvider = new MemoryResourceProvider();
49 server = new AnalysisServer( 49 server = new AnalysisServer(
50 serverChannel, 50 serverChannel,
51 resourceProvider, 51 resourceProvider,
52 new MockPackageMapProvider(), 52 new MockPackageMapProvider(),
53 null, 53 null,
54 serverPlugin, 54 serverPlugin,
55 new AnalysisServerOptions(), 55 new AnalysisServerOptions(),
56 new MockSdk(), 56 () => new MockSdk(),
57 InstrumentationService.NULL_SERVICE); 57 InstrumentationService.NULL_SERVICE);
58 handler = new DiagnosticDomainHandler(server); 58 handler = new DiagnosticDomainHandler(server);
59 }); 59 });
60 60
61 group('DiagnosticDomainHandler', () { 61 group('DiagnosticDomainHandler', () {
62 test('getDiagnostics', () async { 62 test('getDiagnostics', () async {
63 String file = '/project/bin/test.dart'; 63 String file = '/project/bin/test.dart';
64 resourceProvider.newFile('/project/pubspec.yaml', 'name: project'); 64 resourceProvider.newFile('/project/pubspec.yaml', 'name: project');
65 resourceProvider.newFile(file, 'main() {}'); 65 resourceProvider.newFile(file, 'main() {}');
66 66
(...skipping 17 matching lines...) Expand all
84 }); 84 });
85 85
86 test('getDiagnostics - (no root)', () async { 86 test('getDiagnostics - (no root)', () async {
87 var request = new DiagnosticGetDiagnosticsParams().toRequest('0'); 87 var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
88 var response = handler.handleRequest(request); 88 var response = handler.handleRequest(request);
89 var json = response.toJson()[Response.RESULT]; 89 var json = response.toJson()[Response.RESULT];
90 expect(json['contexts'], hasLength(0)); 90 expect(json['contexts'], hasLength(0));
91 }); 91 });
92 }); 92 });
93 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698