Same file separators for generation tests on windows
This commit is contained in:
@@ -18,6 +18,8 @@ package org.jetbrains.jet.test.generator;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @author abreslav
|
||||
*/
|
||||
@@ -57,4 +59,8 @@ public class Printer {
|
||||
|
||||
indent = indent.substring(INDENTATION_UNIT.length());
|
||||
}
|
||||
|
||||
public static String getFilePath(File file) {
|
||||
return file.getPath().replaceAll("\\\\", "/");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class TestDataFile {
|
||||
}
|
||||
|
||||
public String getTestCall() {
|
||||
return doTestMethodName + "(\"" + file + "\");";
|
||||
return doTestMethodName + "(\"" + Printer.getFilePath(file) + "\");";
|
||||
}
|
||||
|
||||
public String getTestMethodName() {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class TestDataSource {
|
||||
}
|
||||
|
||||
public void getAllTestsPresentCheck(@NotNull Printer p) {
|
||||
p.println("allTestsPresent(" + getTestClassName() + ".class, new File(\"" + rootFile + "\"), " + recursive + ");");
|
||||
p.println("allTestsPresent(" + getTestClassName() + ".class, new File(\"" + Printer.getFilePath(rootFile) + "\"), " + recursive + ");");
|
||||
}
|
||||
|
||||
public String getAllTestsPresentMethodName() {
|
||||
|
||||
Reference in New Issue
Block a user