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

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

Issue 1711433002: Deprecate old "isPotentiallyMutated..." API. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/lib/src/generated/resolver.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.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 4051 matching lines...) Expand 10 before | Expand all | Expand 10 after
4062 } 4062 }
4063 4063
4064 @reflectiveTest 4064 @reflectiveTest
4065 class ResolveVariableReferencesTaskTest extends _AbstractDartTaskTest { 4065 class ResolveVariableReferencesTaskTest extends _AbstractDartTaskTest {
4066 /** 4066 /**
4067 * Verify that the mutated states of the given [variable] correspond to the 4067 * Verify that the mutated states of the given [variable] correspond to the
4068 * [mutatedInClosure] and [mutatedInScope] matchers. 4068 * [mutatedInClosure] and [mutatedInScope] matchers.
4069 */ 4069 */
4070 void expectMutated(FunctionBody body, VariableElement variable, 4070 void expectMutated(FunctionBody body, VariableElement variable,
4071 bool mutatedInClosure, bool mutatedInScope) { 4071 bool mutatedInClosure, bool mutatedInScope) {
4072 expect(variable.isPotentiallyMutatedInClosure, mutatedInClosure);
4073 expect(variable.isPotentiallyMutatedInScope, mutatedInScope);
4074 expect(body.isPotentiallyMutatedInClosure(variable), mutatedInClosure); 4072 expect(body.isPotentiallyMutatedInClosure(variable), mutatedInClosure);
4075 expect(body.isPotentiallyMutatedInScope(variable), mutatedInScope); 4073 expect(body.isPotentiallyMutatedInScope(variable), mutatedInScope);
4076 } 4074 }
4077 4075
4078 test_created_resolved_unit() { 4076 test_created_resolved_unit() {
4079 Source source = newSource( 4077 Source source = newSource(
4080 '/test.dart', 4078 '/test.dart',
4081 r''' 4079 r'''
4082 library lib; 4080 library lib;
4083 class A {} 4081 class A {}
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
4963 /** 4961 /**
4964 * Fill [errorListener] with [result] errors in the current [task]. 4962 * Fill [errorListener] with [result] errors in the current [task].
4965 */ 4963 */
4966 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 4964 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
4967 List<AnalysisError> errors = task.outputs[result]; 4965 List<AnalysisError> errors = task.outputs[result];
4968 expect(errors, isNotNull, reason: result.name); 4966 expect(errors, isNotNull, reason: result.name);
4969 errorListener = new GatheringErrorListener(); 4967 errorListener = new GatheringErrorListener();
4970 errorListener.addAll(errors); 4968 errorListener.addAll(errors);
4971 } 4969 }
4972 } 4970 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698