Minor: fix IDEA warnings in BasicBoxTest.kt
This commit is contained in:
Generated
+4
@@ -2,9 +2,13 @@
|
||||
<dictionary name="bashor">
|
||||
<words>
|
||||
<w>ctor</w>
|
||||
<w>inlining</w>
|
||||
<w>interner</w>
|
||||
<w>kclass</w>
|
||||
<w>lookups</w>
|
||||
<w>minification</w>
|
||||
<w>minifier</w>
|
||||
<w>minify</w>
|
||||
<w>unescape</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
|
||||
@@ -273,9 +273,7 @@ abstract class BasicBoxTest(
|
||||
return getTestName(true) + outputFileSuffix
|
||||
}
|
||||
|
||||
private fun TestModule.outputFileName(directory: File): String {
|
||||
return directory.absolutePath + "/" + outputFileSimpleName() + "_v5"
|
||||
}
|
||||
private fun TestModule.outputFileName(directory: File) = directory.absolutePath + "/" + outputFileSimpleName() + "_v5"
|
||||
|
||||
private fun generateJavaScriptFile(
|
||||
directory: String,
|
||||
@@ -382,7 +380,7 @@ abstract class BasicBoxTest(
|
||||
|
||||
class IncrementalData(var header: ByteArray? = null, val translatedFiles: MutableMap<File, TranslationResultValue> = hashMapOf())
|
||||
|
||||
protected fun translateFiles(
|
||||
private fun translateFiles(
|
||||
units: List<TranslationUnit>,
|
||||
outputFile: File,
|
||||
config: JsConfig,
|
||||
@@ -435,7 +433,7 @@ abstract class BasicBoxTest(
|
||||
checkSourceMap(outputFile, translationResult.program)
|
||||
}
|
||||
|
||||
protected fun processJsProgram(program: JsProgram, psiFiles: List<KtFile>) {
|
||||
private fun processJsProgram(program: JsProgram, psiFiles: List<KtFile>) {
|
||||
psiFiles.asSequence()
|
||||
.map { it.text }
|
||||
.forEach { DirectiveTestUtils.processDirectives(program, it) }
|
||||
@@ -598,7 +596,7 @@ abstract class BasicBoxTest(
|
||||
val boxFunction = ktFile.declarations.find { it is KtNamedFunction && it.name == TEST_FUNCTION }
|
||||
if (boxFunction != null) {
|
||||
testPackage = ktFile.packageFqName.asString()
|
||||
if (testPackage?.isEmpty() ?: false) {
|
||||
if (testPackage?.isEmpty() == true) {
|
||||
testPackage = null
|
||||
}
|
||||
}
|
||||
@@ -629,9 +627,8 @@ abstract class BasicBoxTest(
|
||||
return TestFile(temporaryFile.absolutePath, currentModule, recompile = RECOMPILE_PATTERN.matcher(text).find())
|
||||
}
|
||||
|
||||
override fun createModule(name: String, dependencies: List<String>, friends: List<String>): TestModule? {
|
||||
return TestModule(name, dependencies, friends)
|
||||
}
|
||||
override fun createModule(name: String, dependencies: List<String>, friends: List<String>) =
|
||||
TestModule(name, dependencies, friends)
|
||||
|
||||
override fun close() {
|
||||
FileUtil.delete(tmpDir)
|
||||
@@ -660,9 +657,8 @@ abstract class BasicBoxTest(
|
||||
val hasFilesToRecompile get() = files.any { it.recompile }
|
||||
}
|
||||
|
||||
override fun createEnvironment(): KotlinCoreEnvironment {
|
||||
return KotlinCoreEnvironment.createForTests(testRootDisposable, CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
|
||||
}
|
||||
override fun createEnvironment() =
|
||||
KotlinCoreEnvironment.createForTests(testRootDisposable, CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
|
||||
|
||||
companion object {
|
||||
val METADATA_CACHE = (JsConfig.JS_STDLIB.asSequence() + JsConfig.JS_KOTLIN_TEST)
|
||||
|
||||
Reference in New Issue
Block a user