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

Unified Diff: pkg/analysis_server/test/domain_analysis_test.dart

Issue 1266923004: More fixes for failures on the Windows bot (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/domain_analysis_test.dart
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index 25b4d88125e57f0ff5e9b90316a6ef20b88a0c79..d90922b3c6cbce2d70118e748412dcb31f34ae3f 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -21,9 +21,10 @@ import 'package:unittest/unittest.dart';
import 'analysis_abstract.dart';
import 'mock_sdk.dart';
import 'mocks.dart';
+import 'utils.dart';
main() {
- groupSep = ' | ';
+ initializeTestEnvironment();
defineReflectiveTests(AnalysisDomainTest);
defineReflectiveTests(SetSubscriptionsTest);
@@ -39,9 +40,14 @@ main() {
ExtensionManager manager = new ExtensionManager();
ServerPlugin serverPlugin = new ServerPlugin();
manager.processPlugins([serverPlugin]);
- server = new AnalysisServer(serverChannel, resourceProvider,
- new MockPackageMapProvider(), null, serverPlugin,
- new AnalysisServerOptions(), new MockSdk(),
+ server = new AnalysisServer(
+ serverChannel,
+ resourceProvider,
+ new MockPackageMapProvider(),
+ null,
+ serverPlugin,
+ new AnalysisServerOptions(),
+ new MockSdk(),
InstrumentationService.NULL_SERVICE);
handler = new AnalysisDomainHandler(server);
});
@@ -132,8 +138,9 @@ main() {
group('updateOptions', () {
test('invalid', () {
- var request = new Request(
- '0', ANALYSIS_UPDATE_OPTIONS, {OPTIONS: {'not-an-option': true}});
+ var request = new Request('0', ANALYSIS_UPDATE_OPTIONS, {
+ OPTIONS: {'not-an-option': true}
+ });
var response = handler.handleRequest(request);
// Invalid options should be silently ignored.
expect(response, isResponseSuccess('0'));
@@ -156,7 +163,9 @@ testUpdateContent() {
helper.createSingleFileProject('// empty');
return helper.onAnalysisComplete.then((_) {
Request request = new Request('0', ANALYSIS_UPDATE_CONTENT, {
- 'files': {helper.testFile: {TYPE: 'foo',}}
+ 'files': {
+ helper.testFile: {TYPE: 'foo',}
+ }
});
Response response = helper.handler.handleRequest(request);
expect(response, isResponseFailure('0'));
@@ -291,7 +300,9 @@ class AnalysisDomainTest extends AbstractAnalysisTest {
// Prepare a source file that has errors because it refers to an unknown
// package.
String pkgFile = '/packages/pkgA/libA.dart';
- resourceProvider.newFile(pkgFile, '''
+ resourceProvider.newFile(
+ pkgFile,
+ '''
library lib_a;
class A {}
''');
@@ -322,12 +333,15 @@ f(A a) {
test_setRoots_packages() {
// prepare package
String pkgFile = '/packages/pkgA/libA.dart';
- resourceProvider.newFile(pkgFile, '''
+ resourceProvider.newFile(
+ pkgFile,
+ '''
library lib_a;
class A {}
''');
- packageMapProvider.packageMap['pkgA'] =
- [resourceProvider.getResource('/packages/pkgA')];
+ packageMapProvider.packageMap['pkgA'] = [
+ resourceProvider.getResource('/packages/pkgA')
+ ];
addTestFile('''
import 'package:pkgA/libA.dart';
main(A a) {
@@ -368,9 +382,14 @@ class AnalysisTestHelper {
ExtensionManager manager = new ExtensionManager();
ServerPlugin serverPlugin = new ServerPlugin();
manager.processPlugins([serverPlugin]);
- server = new AnalysisServer(serverChannel, resourceProvider,
- new MockPackageMapProvider(), null, serverPlugin,
- new AnalysisServerOptions(), new MockSdk(),
+ server = new AnalysisServer(
+ serverChannel,
+ resourceProvider,
+ new MockPackageMapProvider(),
+ null,
+ serverPlugin,
+ new AnalysisServerOptions(),
+ new MockSdk(),
InstrumentationService.NULL_SERVICE);
handler = new AnalysisDomainHandler(server);
// listen for notifications
@@ -593,7 +612,9 @@ class SetSubscriptionsTest extends AbstractAnalysisTest {
test_afterAnalysis_packageFile_external() async {
String pkgFile = '/packages/pkgA/lib/libA.dart';
- resourceProvider.newFile(pkgFile, '''
+ resourceProvider.newFile(
+ pkgFile,
+ '''
library lib_a;
class A {}
''');
@@ -623,11 +644,15 @@ main() {
String pkgB = '/pkgA';
String pkgFileA = '$pkgA/lib/libA.dart';
String pkgFileB = '$pkgA/lib/libB.dart';
- resourceProvider.newFile(pkgFileA, '''
+ resourceProvider.newFile(
+ pkgFileA,
+ '''
library lib_a;
class A {}
''');
- resourceProvider.newFile(pkgFileB, '''
+ resourceProvider.newFile(
+ pkgFileB,
+ '''
import 'package:pkgA/libA.dart';
main() {
new A();
@@ -657,7 +682,9 @@ main() {
test_afterAnalysis_packageFile_notUsed() async {
String pkgFile = '/packages/pkgA/lib/libA.dart';
- resourceProvider.newFile(pkgFile, '''
+ resourceProvider.newFile(
+ pkgFile,
+ '''
library lib_a;
class A {}
''');
« no previous file with comments | « pkg/analysis_server/test/context_manager_test.dart ('k') | pkg/analysis_server/test/domain_completion_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698