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

Side by Side Diff: pkg/analyzer/test/src/task/options_test.dart

Issue 1570183002: add parser parseAsync flag (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/analyzer/test/src/task/dart_test.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) 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 analyzer.test.src.task.options_test; 5 library analyzer.test.src.task.options_test;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/source/analysis_options_provider.dart'; 8 import 'package:analyzer/source/analysis_options_provider.dart';
9 import 'package:analyzer/source/error_processor.dart'; 9 import 'package:analyzer/source/error_processor.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 optionsProvider.getOptionsFromString(source); 43 optionsProvider.getOptionsFromString(source);
44 44
45 test_configure_bad_options_contents() { 45 test_configure_bad_options_contents() {
46 configureContext(''' 46 configureContext('''
47 analyzer: 47 analyzer:
48 strong-mode:true # misformatted 48 strong-mode:true # misformatted
49 '''); 49 ''');
50 expect(analysisOptions.strongMode, false); 50 expect(analysisOptions.strongMode, false);
51 } 51 }
52 52
53 test_configure_enableAsync() {
54 configureContext('''
55 analyzer:
56 language:
57 ''');
58 expect(analysisOptions.enableAsync, true);
59 }
60
61 test_configure_enableAsync_false() {
62 configureContext('''
63 analyzer:
64 language:
65 enableAsync: false
66 ''');
67 expect(analysisOptions.enableAsync, false);
68 }
69
53 test_configure_enableGenericMethods() { 70 test_configure_enableGenericMethods() {
54 expect(analysisOptions.enableGenericMethods, false); 71 expect(analysisOptions.enableGenericMethods, false);
55 configureContext(''' 72 configureContext('''
56 analyzer: 73 analyzer:
57 language: 74 language:
58 enableGenericMethods: true 75 enableGenericMethods: true
59 '''); 76 ''');
60 expect(analysisOptions.enableGenericMethods, true); 77 expect(analysisOptions.enableGenericMethods, true);
61 } 78 }
62 79
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE]); 377 [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE]);
361 } 378 }
362 379
363 void validate(String source, List<AnalysisOptionsErrorCode> expected) { 380 void validate(String source, List<AnalysisOptionsErrorCode> expected) {
364 var options = optionsProvider.getOptionsFromString(source); 381 var options = optionsProvider.getOptionsFromString(source);
365 var errors = validator.validate(options); 382 var errors = validator.validate(options);
366 expect(errors.map((AnalysisError e) => e.errorCode), 383 expect(errors.map((AnalysisError e) => e.errorCode),
367 unorderedEquals(expected)); 384 unorderedEquals(expected));
368 } 385 }
369 } 386 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/task/dart_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698