| Index: compiler/javatests/com/google/dart/compiler/backend/common/TypeHeuristicImplementationTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/backend/common/TypeHeuristicImplementationTest.java b/compiler/javatests/com/google/dart/compiler/backend/common/TypeHeuristicImplementationTest.java
|
| index 6e6d6ec35b8a04406931578f97b09c2caef36c19..89f28cc5c6d7b07f16e66b62e08ee99466bc5307 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/backend/common/TypeHeuristicImplementationTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/backend/common/TypeHeuristicImplementationTest.java
|
| @@ -13,6 +13,7 @@ import com.google.dart.compiler.DartSourceTest;
|
| import com.google.dart.compiler.DefaultCompilerConfiguration;
|
| import com.google.dart.compiler.DefaultDartArtifactProvider;
|
| import com.google.dart.compiler.MockLibrarySource;
|
| +import com.google.dart.compiler.Source;
|
| import com.google.dart.compiler.ast.DartBinaryExpression;
|
| import com.google.dart.compiler.ast.DartClass;
|
| import com.google.dart.compiler.ast.DartExprStmt;
|
| @@ -34,6 +35,7 @@ import com.google.dart.compiler.resolver.FieldElement;
|
| import com.google.dart.compiler.resolver.MethodElement;
|
| import com.google.dart.compiler.type.Type;
|
|
|
| +import java.io.File;
|
| import java.io.IOException;
|
| import java.net.URI;
|
| import java.net.URL;
|
| @@ -68,7 +70,18 @@ public class TypeHeuristicImplementationTest extends CompilerTestCase {
|
| lib.addSource(src);
|
| Map<URI, DartUnit> parsedUnits = new HashMap<URI, DartUnit>();
|
| DefaultCompilerConfiguration config = new DefaultCompilerConfiguration();
|
| - DefaultDartArtifactProvider provider = new DefaultDartArtifactProvider(Files.createTempDir());
|
| + File tempDir = Files.createTempDir();
|
| + tempDir.deleteOnExit();
|
| + DefaultDartArtifactProvider provider = new DefaultDartArtifactProvider(tempDir) {
|
| + @Override
|
| + protected File getArtifactFile(Source source, String part, String extension) {
|
| + File file = super.getArtifactFile(source, part, extension);
|
| + if (file != null) {
|
| + file.deleteOnExit();
|
| + }
|
| + return file;
|
| + }
|
| + };
|
| DartCompilerListener listener = DartCompilerListener.EMPTY;
|
| LibraryUnit libUnit = DartCompiler.analyzeLibrary(lib, parsedUnits, config, provider,
|
| listener);
|
|
|