Fix file separators in Codegen Tests on Windows
This commit is contained in:
@@ -111,8 +111,9 @@ public abstract class CodegenTestCase extends UsefulTestCase {
|
|||||||
@NotNull
|
@NotNull
|
||||||
protected String relativePath(@NotNull File file) {
|
protected String relativePath(@NotNull File file) {
|
||||||
String stringToCut = "compiler/testData/codegen/";
|
String stringToCut = "compiler/testData/codegen/";
|
||||||
assert file.getPath().startsWith(stringToCut) : "File path is not absolute: " + file;
|
String systemIndependentPath = file.getPath().replace(File.separatorChar, '/');
|
||||||
return file.getPath().substring(stringToCut.length());
|
assert systemIndependentPath.startsWith(stringToCut) : "File path is not absolute: " + file;
|
||||||
|
return systemIndependentPath.substring(stringToCut.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
Reference in New Issue
Block a user