From a96474845bffd049fcf26f67bf79762721ef94a8 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Thu, 6 Sep 2012 12:02:44 +0400 Subject: [PATCH] Fix check of path separators in tests --- compiler/tests/org/jetbrains/jet/JetTestUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/tests/org/jetbrains/jet/JetTestUtils.java b/compiler/tests/org/jetbrains/jet/JetTestUtils.java index 6911aeb9d19..6a9f2c3c717 100644 --- a/compiler/tests/org/jetbrains/jet/JetTestUtils.java +++ b/compiler/tests/org/jetbrains/jet/JetTestUtils.java @@ -282,7 +282,7 @@ public class JetTestUtils { } public static String getFilePath(File file) { - return file.getPath().replaceAll("\\\\", "/"); + return FileUtil.toSystemIndependentName(file.getPath()); } public interface TestFileFactory { @@ -434,7 +434,7 @@ public class JetTestUtils { Class[] innerClasses = innerClassesAnnotation == null ? NO_INNER_CLASSES : innerClassesAnnotation.value(); for (Class innerClass : innerClasses) { TestMetadata testMetadata = innerClass.getAnnotation(TestMetadata.class); - if (testMetadata != null && testMetadata.value().equals(testDataDir.getPath())) { + if (testMetadata != null && testMetadata.value().equals(getFilePath(testDataDir))) { return; } }