[minor] uncomment 2 scripting tests:
Tests were failing before, but now fixed, most likely by switching to default target 1.8 and some changes in scripting IR support. #KT-44471 fixed
This commit is contained in:
@@ -239,16 +239,16 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
|
||||
}
|
||||
|
||||
fun testScriptWithXArguments() {
|
||||
// runProcess(
|
||||
// "kotlin", "$testDataDirectory/funWithResultReturn.kts",
|
||||
// expectedExitCode = 1,
|
||||
// expectedStderr = """error: 'kotlin.Result' cannot be used as a return type (funWithResultReturn.kts:2:11)
|
||||
//compiler/testData/launcher/funWithResultReturn.kts:2:11: error: 'kotlin.Result' cannot be used as a return type
|
||||
//fun f() : Result<Int> = Result.success(42)
|
||||
// ^
|
||||
//"""
|
||||
// )
|
||||
// runProcess("kotlin", "-Xallow-result-return-type", "$testDataDirectory/funWithResultReturn.kts", expectedStdout = "42\n")
|
||||
runProcess(
|
||||
"kotlin", "$testDataDirectory/funWithResultReturn.kts",
|
||||
expectedExitCode = 1,
|
||||
expectedStderr = """error: 'kotlin.Result' cannot be used as a return type (funWithResultReturn.kts:2:11)
|
||||
compiler/testData/launcher/funWithResultReturn.kts:2:11: error: 'kotlin.Result' cannot be used as a return type
|
||||
fun f() : Result<Int> = Result.success(42)
|
||||
^
|
||||
"""
|
||||
)
|
||||
runProcess("kotlin", "-Xallow-result-return-type", "$testDataDirectory/funWithResultReturn.kts", expectedStdout = "42\n")
|
||||
}
|
||||
|
||||
fun testNoStdLib() {
|
||||
|
||||
+4
-4
@@ -321,10 +321,10 @@ obj
|
||||
|
||||
scriptEngine.put("aValue", 3)
|
||||
|
||||
// val res1 = scriptEngine.eval(script1)
|
||||
// Assert.assertEquals(1, res1)
|
||||
// val res2 = scriptEngine.eval(script2)
|
||||
// Assert.assertEquals(2, res2)
|
||||
val res1 = scriptEngine.eval(script1)
|
||||
Assert.assertEquals(1, res1)
|
||||
val res2 = scriptEngine.eval(script2)
|
||||
Assert.assertEquals(2, res2)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user