From 23053a2be2d592f0359773df861b25d490da8dcf Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Mon, 8 Dec 2014 22:07:00 +0300 Subject: [PATCH] Ability to change codegen test path (for plugins) --- .../org/jetbrains/kotlin/codegen/CodegenTestCase.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java b/compiler/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java index df20229d722..3e57400caed 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CodegenTestCase.java @@ -108,9 +108,14 @@ public abstract class CodegenTestCase extends UsefulTestCase { loadFile(getPrefix() + "/" + getTestName(true) + ".kt"); } + @NotNull + protected String codegenTestBasePath() { + return "compiler/testData/codegen/"; + } + @NotNull protected String relativePath(@NotNull File file) { - String stringToCut = "compiler/testData/codegen/"; + String stringToCut = codegenTestBasePath(); String systemIndependentPath = file.getPath().replace(File.separatorChar, '/'); assert systemIndependentPath.startsWith(stringToCut) : "File path is not absolute: " + file; return systemIndependentPath.substring(stringToCut.length());