[Wasm] Add JS box/native tests

This commit is contained in:
Svyatoslav Kuzmich
2021-11-11 17:10:37 +03:00
parent 08362e8b38
commit 49d63abc88
29 changed files with 177 additions and 0 deletions
@@ -39,6 +39,7 @@ fun main(args: Array<String>) {
testClass<AbstractJsTranslatorWasmTest> {
model("box/main", pattern = "^([^_](.+))\\.kt$", targetBackend = TargetBackend.WASM)
model("box/kotlin.test/", pattern = "^([^_](.+))\\.kt$", targetBackend = TargetBackend.WASM)
model("box/native/", pattern = "^([^_](.+))\\.kt$", targetBackend = TargetBackend.WASM)
}
testClass<AbstractIrBoxJsES6Test> {
@@ -86,6 +86,11 @@ abstract class BasicWasmBoxTest(
}
}
val additionalJsFile = filePath.removeSuffix(".kt") + ".js"
if (File(additionalJsFile).exists()) {
jsFilesBefore += additionalJsFile
}
val localCommonFile = file.parent + "/" + COMMON_FILES_NAME + "." + KotlinFileType.EXTENSION
val localCommonFiles = if (File(localCommonFile).exists()) listOf(localCommonFile) else emptyList()