Replace parent with parentFile, relativePath with relativeTo
This commit is contained in:
@@ -27,7 +27,7 @@ public abstract class AbstractBytecodeListingTest : CodegenTestCase() {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.ALL)
|
||||
loadFileByFullPath(filename)
|
||||
val ktFile = File(filename)
|
||||
val txtFile = File(ktFile.parent, ktFile.nameWithoutExtension + ".txt")
|
||||
val txtFile = File(ktFile.parentFile, ktFile.nameWithoutExtension + ".txt")
|
||||
val generatedFiles = CodegenTestUtil.generateFiles(myEnvironment, myFiles)
|
||||
.getClassFiles()
|
||||
.sortedBy { it.relativePath }
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi
|
||||
val packageScopes = arrayListOf<JetScope>()
|
||||
val classes = arrayListOf<ClassDescriptor>()
|
||||
for (classFile in allClassFiles) {
|
||||
val className = tmpdir.relativePath(classFile).substringBeforeLast(".class").replace('/', '.').replace('\\', '.')
|
||||
val className = classFile.relativeTo(tmpdir).substringBeforeLast(".class").replace('/', '.').replace('\\', '.')
|
||||
|
||||
val klass = classLoader.loadClass(className).sure { "Couldn't load class $className" }
|
||||
val header = ReflectKotlinClass.create(klass)?.getClassHeader()
|
||||
|
||||
Reference in New Issue
Block a user