From 8e38d8d3aa427ba59ab5e8e7521d5c934166e862 Mon Sep 17 00:00:00 2001 From: Ulf Adams Date: Fri, 24 Apr 2015 15:56:13 +0000 Subject: Inline FoundationTestCase.overwriteScratchFile. -- MOS_MIGRATED_REVID=91986167 --- .../google/devtools/build/lib/testutil/FoundationTestCase.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/test/java/com/google/devtools/build') diff --git a/src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java b/src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java index 230a01e1e6..2355040d48 100644 --- a/src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java +++ b/src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java @@ -114,7 +114,7 @@ public abstract class FoundationTestCase extends TestCase { String context = loadFile(file); Path path = rootDirectory.getRelative(to + "/" + fileName); if (path.exists()) { - overwriteScratchFile(path.getPathString(), context); + scratch.overwriteFile(path.getPathString(), context); } else { scratchFile(path.getPathString(), context); } @@ -149,14 +149,6 @@ public abstract class FoundationTestCase extends TestCase { return scratch.file(pathName, lines); } - /** - * Like {@code scratchFile}, but the file is first deleted if it already - * exists. - */ - protected Path overwriteScratchFile(String pathName, String... lines) throws IOException { - return scratch.overwriteFile(pathName, lines); - } - // Mix-in assertions: protected void assertNoEvents() { -- cgit v1.2.3