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

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

Issue 2668103002: Fix SDK partitions leak in tests. (Closed)
Patch Set: Created 3 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 | « no previous file | 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 testing.abstract_context; 5 library testing.abstract_context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 AnalysisEngine.instance.logger = PrintLogger.instance; 161 AnalysisEngine.instance.logger = PrintLogger.instance;
162 } 162 }
163 163
164 void setupResourceProvider() { 164 void setupResourceProvider() {
165 provider = new MemoryResourceProvider(); 165 provider = new MemoryResourceProvider();
166 } 166 }
167 167
168 void tearDown() { 168 void tearDown() {
169 _context = null; 169 _context = null;
170 provider = null; 170 provider = null;
171 AnalysisEngine.instance.clearCaches();
171 AnalysisEngine.instance.logger = null; 172 AnalysisEngine.instance.logger = null;
172 } 173 }
173 } 174 }
174 175
175 /** 176 /**
176 * Instances of the class [PrintLogger] print all of the errors. 177 * Instances of the class [PrintLogger] print all of the errors.
177 */ 178 */
178 class PrintLogger implements Logger { 179 class PrintLogger implements Logger {
179 static final Logger instance = new PrintLogger(); 180 static final Logger instance = new PrintLogger();
180 181
(...skipping 19 matching lines...) Expand all
200 * [engine.GeneralizingElementVisitor]. 201 * [engine.GeneralizingElementVisitor].
201 */ 202 */
202 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { 203 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor {
203 final _ElementVisitorFunction function; 204 final _ElementVisitorFunction function;
204 _ElementVisitorFunctionWrapper(this.function); 205 _ElementVisitorFunctionWrapper(this.function);
205 visitElement(Element element) { 206 visitElement(Element element) {
206 function(element); 207 function(element);
207 super.visitElement(element); 208 super.visitElement(element);
208 } 209 }
209 } 210 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698