Use kts file extension instead of kt in tests...
since all "kt" files are now considered - definitely non-scripts
This commit is contained in:
@@ -50,7 +50,7 @@ class ScriptGenTest : CodegenTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun testLanguage() {
|
fun testLanguage() {
|
||||||
setUpEnvironment("scriptCustom/fib.lang.kt")
|
setUpEnvironment("scriptCustom/fib.lang.kts")
|
||||||
|
|
||||||
val aClass = generateClass("Fib_lang")
|
val aClass = generateClass("Fib_lang")
|
||||||
val constructor = aClass.getConstructor(Integer.TYPE)
|
val constructor = aClass.getConstructor(Integer.TYPE)
|
||||||
@@ -61,7 +61,7 @@ class ScriptGenTest : CodegenTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun testLanguageWithPackage() {
|
fun testLanguageWithPackage() {
|
||||||
setUpEnvironment("scriptCustom/fibwp.lang.kt")
|
setUpEnvironment("scriptCustom/fibwp.lang.kts")
|
||||||
|
|
||||||
val aClass = generateClass("test.Fibwp_lang")
|
val aClass = generateClass("test.Fibwp_lang")
|
||||||
val constructor = aClass.getConstructor(Integer.TYPE)
|
val constructor = aClass.getConstructor(Integer.TYPE)
|
||||||
@@ -72,7 +72,7 @@ class ScriptGenTest : CodegenTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun testDependentScripts() {
|
fun testDependentScripts() {
|
||||||
setUpEnvironment(listOf("scriptCustom/fibwp.lang.kt", "scriptCustom/fibwprunner.kts"))
|
setUpEnvironment(listOf("scriptCustom/fibwp.lang.kts", "scriptCustom/fibwprunner.kts"))
|
||||||
|
|
||||||
val aClass = generateClass("Fibwprunner")
|
val aClass = generateClass("Fibwprunner")
|
||||||
val constructor = aClass.getConstructor()
|
val constructor = aClass.getConstructor()
|
||||||
@@ -88,7 +88,7 @@ class ScriptGenTest : CodegenTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun testScriptWhereMethodHasClosure() {
|
fun testScriptWhereMethodHasClosure() {
|
||||||
setUpEnvironment("scriptCustom/methodWithClosure.lang.kt")
|
setUpEnvironment("scriptCustom/methodWithClosure.lang.kts")
|
||||||
|
|
||||||
val aClass = generateClass("MethodWithClosure_lang")
|
val aClass = generateClass("MethodWithClosure_lang")
|
||||||
val constructor = aClass.getConstructor(Integer.TYPE)
|
val constructor = aClass.getConstructor(Integer.TYPE)
|
||||||
@@ -127,6 +127,6 @@ class ScriptGenTest : CodegenTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ScriptTemplateDefinition(
|
@ScriptTemplateDefinition(
|
||||||
scriptFilePattern =".*\\.lang\\.kt",
|
scriptFilePattern =".*\\.lang\\.kts",
|
||||||
resolver = TestKotlinScriptDependenciesResolver::class)
|
resolver = TestKotlinScriptDependenciesResolver::class)
|
||||||
abstract class ScriptWithIntParam(val num: Int)
|
abstract class ScriptWithIntParam(val num: Int)
|
||||||
Reference in New Issue
Block a user