From c484e37b02dcc646e44fd1fb532863167159a321 Mon Sep 17 00:00:00 2001 From: Leonid Shalupov Date: Sun, 29 Apr 2012 15:54:39 +0400 Subject: [PATCH] integration tests: .gold -> .expected --- .../{hello.compile.gold => hello.compile.expected} | 0 .../data/{hello.run.gold => hello.run.expected} | 0 .../data/{help.gold => help.expected} | 0 .../jetbrains/kotlin/KotlinIntegrationTestBase.java | 11 ++++++----- 4 files changed, 6 insertions(+), 5 deletions(-) rename compiler/integration-tests/data/{hello.compile.gold => hello.compile.expected} (100%) rename compiler/integration-tests/data/{hello.run.gold => hello.run.expected} (100%) rename compiler/integration-tests/data/{help.gold => help.expected} (100%) diff --git a/compiler/integration-tests/data/hello.compile.gold b/compiler/integration-tests/data/hello.compile.expected similarity index 100% rename from compiler/integration-tests/data/hello.compile.gold rename to compiler/integration-tests/data/hello.compile.expected diff --git a/compiler/integration-tests/data/hello.run.gold b/compiler/integration-tests/data/hello.run.expected similarity index 100% rename from compiler/integration-tests/data/hello.run.gold rename to compiler/integration-tests/data/hello.run.expected diff --git a/compiler/integration-tests/data/help.gold b/compiler/integration-tests/data/help.expected similarity index 100% rename from compiler/integration-tests/data/help.gold rename to compiler/integration-tests/data/help.expected diff --git a/compiler/integration-tests/src/org/jetbrains/kotlin/KotlinIntegrationTestBase.java b/compiler/integration-tests/src/org/jetbrains/kotlin/KotlinIntegrationTestBase.java index 8f5ab4b894a..107b96d279f 100644 --- a/compiler/integration-tests/src/org/jetbrains/kotlin/KotlinIntegrationTestBase.java +++ b/compiler/integration-tests/src/org/jetbrains/kotlin/KotlinIntegrationTestBase.java @@ -111,18 +111,19 @@ public abstract class KotlinIntegrationTestBase { protected void check(String baseName, StringBuilder content) throws IOException { final File tmpFile = new File(getTestDataDirectory(), baseName + ".tmp"); - final File goldFile = new File(getTestDataDirectory(), baseName + ".gold"); + final File expectedFile = new File(getTestDataDirectory(), baseName + ".expected"); - if (!goldFile.isFile()) { + if (!expectedFile.isFile()) { Files.write(content, tmpFile, Charsets.UTF_8); - fail("No gold file " + goldFile); + fail("No .expected file " + expectedFile); } else { - final String goldContent = Files.toString(goldFile, UTF_8); + final String goldContent = Files.toString(expectedFile, UTF_8); if (!goldContent.equals(content.toString())) { Files.write(content, tmpFile, Charsets.UTF_8); - fail("tmp and gold differ, tmp file: " + tmpFile); + fail(".tmp and .expected files differ, tmp file: " + tmpFile); } + tmpFile.delete(); } }