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

Side by Side Diff: pkg/analysis_server/test/analysis/get_errors_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 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.analysis.get_errors; 5 library test.analysis.get_errors;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/domain_analysis.dart'; 9 import 'package:analysis_server/src/domain_analysis.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
11 import 'package:analyzer/file_system/file_system.dart'; 11 import 'package:analyzer/file_system/file_system.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; 12 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
14 14
15 import '../analysis_abstract.dart'; 15 import '../analysis_abstract.dart';
16 import '../utils.dart';
16 17
17 main() { 18 main() {
18 groupSep = ' | '; 19 initializeTestEnvironment();
19 defineReflectiveTests(GetErrorsTest); 20 defineReflectiveTests(GetErrorsTest);
20 } 21 }
21 22
22 @reflectiveTest 23 @reflectiveTest
23 class GetErrorsTest extends AbstractAnalysisTest { 24 class GetErrorsTest extends AbstractAnalysisTest {
24 static const String requestId = 'test-getError'; 25 static const String requestId = 'test-getError';
25 26
26 @override 27 @override
27 void setUp() { 28 void setUp() {
28 super.setUp(); 29 super.setUp();
(...skipping 14 matching lines...) Expand all
43 }); 44 });
44 } 45 }
45 46
46 test_fileDoesNotExist() { 47 test_fileDoesNotExist() {
47 String file = '$projectPath/doesNotExist.dart'; 48 String file = '$projectPath/doesNotExist.dart';
48 return _checkInvalid(file); 49 return _checkInvalid(file);
49 } 50 }
50 51
51 test_fileWithoutContext() { 52 test_fileWithoutContext() {
52 String file = '/outside.dart'; 53 String file = '/outside.dart';
53 addFile(file, ''' 54 addFile(
55 file,
56 '''
54 main() { 57 main() {
55 print(42); 58 print(42);
56 } 59 }
57 '''); 60 ''');
58 return _checkInvalid(file); 61 return _checkInvalid(file);
59 } 62 }
60 63
61 test_hasErrors() { 64 test_hasErrors() {
62 addTestFile(''' 65 addTestFile('''
63 main() { 66 main() {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return new AnalysisGetErrorsParams(testFile).toRequest(requestId); 123 return new AnalysisGetErrorsParams(testFile).toRequest(requestId);
121 } 124 }
122 125
123 Future<List<AnalysisError>> _getErrors(String file) { 126 Future<List<AnalysisError>> _getErrors(String file) {
124 Request request = _createGetErrorsRequest(); 127 Request request = _createGetErrorsRequest();
125 return serverChannel.sendRequest(request).then((Response response) { 128 return serverChannel.sendRequest(request).then((Response response) {
126 return new AnalysisGetErrorsResult.fromResponse(response).errors; 129 return new AnalysisGetErrorsResult.fromResponse(response).errors;
127 }); 130 });
128 } 131 }
129 } 132 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analysis_server/test/analysis/get_hover_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698