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

Side by Side Diff: pkg/analyzer/test/src/task/dart_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
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.dart_test; 5 library analyzer.test.src.task.dart_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/ast/visitor.dart'; 9 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 3526 matching lines...) Expand 10 before | Expand all | Expand 10 after
3537 3537
3538 MethodDeclaration method = members[1]; 3538 MethodDeclaration method = members[1];
3539 expectReference(method.body, false); 3539 expectReference(method.body, false);
3540 } 3540 }
3541 } 3541 }
3542 3542
3543 @reflectiveTest 3543 @reflectiveTest
3544 class ReferencedNamesBuilderTest extends _AbstractDartTaskTest { 3544 class ReferencedNamesBuilderTest extends _AbstractDartTaskTest {
3545 void setUp() { 3545 void setUp() {
3546 super.setUp(); 3546 super.setUp();
3547 context.analysisOptions = new AnalysisOptionsImpl() 3547 context.analysisOptions = new AnalysisOptionsImpl()..strongMode = true;
3548 ..enableGenericMethods = true
3549 ..strongMode = true;
3550 } 3548 }
3551 3549
3552 test_class_constructor() { 3550 test_class_constructor() {
3553 ReferencedNames info = _computeReferencedNames(''' 3551 ReferencedNames info = _computeReferencedNames('''
3554 class U { 3552 class U {
3555 U.named(A a, B b) { 3553 U.named(A a, B b) {
3556 C c = null; 3554 C c = null;
3557 } 3555 }
3558 } 3556 }
3559 '''); 3557 ''');
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
5658 /** 5656 /**
5659 * Fill [errorListener] with [result] errors in the current [task]. 5657 * Fill [errorListener] with [result] errors in the current [task].
5660 */ 5658 */
5661 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 5659 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
5662 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; 5660 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>;
5663 expect(errors, isNotNull, reason: result.name); 5661 expect(errors, isNotNull, reason: result.name);
5664 errorListener = new GatheringErrorListener(); 5662 errorListener = new GatheringErrorListener();
5665 errorListener.addAll(errors); 5663 errorListener.addAll(errors);
5666 } 5664 }
5667 } 5665 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_common.dart ('k') | pkg/analyzer/test/src/task/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698