Analysis LC: introduce Symbol LC tests
This commit is contained in:
+3
-2
@@ -11,6 +11,7 @@ import org.jetbrains.kotlin.test.model.ServicesAndDirectivesContainer
|
||||
import org.jetbrains.kotlin.test.model.TestFile
|
||||
import org.jetbrains.kotlin.test.model.TestModule
|
||||
import java.io.File
|
||||
import java.nio.file.Paths
|
||||
|
||||
abstract class AdditionalSourceProvider(val testServices: TestServices) : ServicesAndDirectivesContainer {
|
||||
/**
|
||||
@@ -22,9 +23,9 @@ abstract class AdditionalSourceProvider(val testServices: TestServices) : Servic
|
||||
return globalDirectives.contains(directive) || module.directives.contains(directive)
|
||||
}
|
||||
|
||||
protected fun File.toTestFile(): TestFile {
|
||||
protected fun File.toTestFile(relativePath: String? = null): TestFile {
|
||||
return TestFile(
|
||||
this.name,
|
||||
relativePath?.let(Paths::get)?.resolve(name)?.toString() ?: name,
|
||||
this.readText(),
|
||||
originalFile = this,
|
||||
startLineNumberInOriginalFile = 0,
|
||||
|
||||
Reference in New Issue
Block a user