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

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

Issue 2488043002: Enable generic method support by default (Closed)
Patch Set: clean up Created 4 years, 1 month 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') | tests/language/language_analyzer2.status » ('j') | 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/context/context.dart'; 10 import 'package:analyzer/src/context/context.dart';
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 optionsProvider.getOptionsFromString(source); 47 optionsProvider.getOptionsFromString(source);
48 48
49 test_configure_bad_options_contents() { 49 test_configure_bad_options_contents() {
50 configureContext(''' 50 configureContext('''
51 analyzer: 51 analyzer:
52 strong-mode:true # misformatted 52 strong-mode:true # misformatted
53 '''); 53 ''');
54 expect(analysisOptions.strongMode, false); 54 expect(analysisOptions.strongMode, false);
55 } 55 }
56 56
57 test_configure_enableGenericMethods() { 57 test_configure_enableLazyAssignmentOperators() {
58 expect(analysisOptions.enableGenericMethods, false); 58 expect(analysisOptions.enableStrictCallChecks, false);
59 configureContext(''' 59 configureContext('''
60 analyzer: 60 analyzer:
61 language: 61 language:
62 enableGenericMethods: true 62 enableStrictCallChecks: true
63 '''); 63 ''');
64 expect(analysisOptions.enableGenericMethods, true); 64 expect(analysisOptions.enableStrictCallChecks, true);
65 } 65 }
66 66
67 test_configure_enableStrictCallChecks() { 67 test_configure_enableStrictCallChecks() {
68 configureContext(''' 68 configureContext('''
69 analyzer: 69 analyzer:
70 language: 70 language:
71 enableStrictCallChecks: true 71 enableStrictCallChecks: true
72 '''); 72 ''');
73 expect(analysisOptions.enableStrictCallChecks, true); 73 expect(analysisOptions.enableStrictCallChecks, true);
74 } 74 }
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE]); 392 [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE]);
393 } 393 }
394 394
395 void validate(String source, List<ErrorCode> expected) { 395 void validate(String source, List<ErrorCode> expected) {
396 var options = optionsProvider.getOptionsFromString(source); 396 var options = optionsProvider.getOptionsFromString(source);
397 var errors = validator.validate(options); 397 var errors = validator.validate(options);
398 expect(errors.map((AnalysisError e) => e.errorCode), 398 expect(errors.map((AnalysisError e) => e.errorCode),
399 unorderedEquals(expected)); 399 unorderedEquals(expected));
400 } 400 }
401 } 401 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/task/dart_test.dart ('k') | tests/language/language_analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698