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

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

Issue 1574523002: add enableAsync to analysis option file flags (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 4 years, 11 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
« no previous file with comments | « pkg/analysis_server/lib/src/status/get_handler.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.context.directory.manager; 5 library test.context.directory.manager;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/context_manager.dart'; 9 import 'package:analysis_server/src/context_manager.dart';
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 // Setup .analysis_options 310 // Setup .analysis_options
311 newFile( 311 newFile(
312 [projPath, AnalysisEngine.ANALYSIS_OPTIONS_FILE], 312 [projPath, AnalysisEngine.ANALYSIS_OPTIONS_FILE],
313 r''' 313 r'''
314 analyzer: 314 analyzer:
315 exclude: 315 exclude:
316 - 'test/**' 316 - 'test/**'
317 language: 317 language:
318 enableGenericMethods: true 318 enableGenericMethods: true
319 enableAsync: false
319 errors: 320 errors:
320 unused_local_variable: false 321 unused_local_variable: false
321 linter: 322 linter:
322 rules: 323 rules:
323 - camel_case_types 324 - camel_case_types
324 '''); 325 ''');
325 326
326 // Setup context. 327 // Setup context.
327 manager.setRoots(<String>[projPath], <String>[], <String, String>{}); 328 manager.setRoots(<String>[projPath], <String>[], <String, String>{});
328 await pumpEventQueue(); 329 await pumpEventQueue();
329 330
330 // Confirm that one context was created. 331 // Confirm that one context was created.
331 var contexts = 332 var contexts =
332 manager.contextsInAnalysisRoot(resourceProvider.newFolder(projPath)); 333 manager.contextsInAnalysisRoot(resourceProvider.newFolder(projPath));
333 expect(contexts, isNotNull); 334 expect(contexts, isNotNull);
334 expect(contexts, hasLength(1)); 335 expect(contexts, hasLength(1));
335 var context = contexts[0]; 336 var context = contexts[0];
336 337
337 // Verify options. 338 // Verify options.
338 // * from `_embedder.yaml`: 339 // * from `_embedder.yaml`:
339 expect(context.analysisOptions.strongMode, isTrue); 340 expect(context.analysisOptions.strongMode, isTrue);
340 expect(context.analysisOptions.enableSuperMixins, isTrue); 341 expect(context.analysisOptions.enableSuperMixins, isTrue);
342 expect(context.analysisOptions.enableAsync, isFalse);
341 // * from `.analysis_options`: 343 // * from `.analysis_options`:
342 expect(context.analysisOptions.enableGenericMethods, isTrue); 344 expect(context.analysisOptions.enableGenericMethods, isTrue);
343 // * verify tests are excluded 345 // * verify tests are excluded
344 expect(callbacks.currentContextFilePaths[projPath].keys, 346 expect(callbacks.currentContextFilePaths[projPath].keys,
345 ['/my/proj/sdk_ext/entry.dart']); 347 ['/my/proj/sdk_ext/entry.dart']);
346 348
347 // Verify filter setup. 349 // Verify filter setup.
348 expect(errorProcessors, hasLength(2)); 350 expect(errorProcessors, hasLength(2));
349 351
350 // * (embedder.) 352 // * (embedder.)
(...skipping 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after
2416 class TestUriResolver extends UriResolver { 2418 class TestUriResolver extends UriResolver {
2417 Map<Uri, Source> uriMap; 2419 Map<Uri, Source> uriMap;
2418 2420
2419 TestUriResolver(this.uriMap); 2421 TestUriResolver(this.uriMap);
2420 2422
2421 @override 2423 @override
2422 Source resolveAbsolute(Uri uri, [Uri actualUri]) { 2424 Source resolveAbsolute(Uri uri, [Uri actualUri]) {
2423 return uriMap[uri]; 2425 return uriMap[uri];
2424 } 2426 }
2425 } 2427 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/status/get_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698