Fix merging errors

This commit is contained in:
Ilya Chernikov
2017-02-12 10:58:07 +01:00
parent d3682b7f7d
commit 1ae95853e7
3 changed files with 16 additions and 16 deletions
@@ -91,8 +91,10 @@ class GenericReplTest : TestCase() {
listOf(File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-runtime.jar")),
"kotlin.script.templates.standard.ScriptTemplateWithArgs")
val codeLine0 = ReplCodeLine(0, "val l1 = 1\r\nl1\r\n")
val res0 = repl.replCompiler?.check(codeLine0)
val state = repl.createState()
val codeLine0 = ReplCodeLine(0, 0, "val l1 = 1\r\nl1\r\n")
val res0 = repl.replCompiler?.check(state, codeLine0)
val res0c = res0 as? ReplCheckResult.Ok
TestCase.assertNotNull("Unexpected compile result: $res0", res0c)
@@ -534,12 +534,11 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
fun testDaemonReplLocalEvalNoParams() {
withDaemon { daemon ->
withDisposable { disposable ->
val repl = KotlinRemoteReplCompilerClient(daemon!!, null, CompileService.TargetPlatform.JVM,
emptyArray(),
TestMessageCollector(),
classpathFromClassloader(),
ScriptWithNoParam::class.qualifiedName!!)
val repl = KotlinRemoteReplCompilerClient(daemon!!, null, CompileService.TargetPlatform.JVM,
emptyArray(),
TestMessageCollector(),
classpathFromClassloader(),
ScriptWithNoParam::class.qualifiedName!!)
val localEvaluator = GenericReplEvaluator(emptyList(), Thread.currentThread().contextClassLoader)
@@ -550,11 +549,10 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
fun testDaemonReplLocalEvalStandardTemplate() {
withDaemon { daemon ->
withDisposable { disposable ->
val repl = KotlinRemoteReplCompilerClient(daemon!!, null, CompileService.TargetPlatform.JVM, emptyArray(),
TestMessageCollector(),
classpathFromClassloader(),
"kotlin.script.templates.standard.ScriptTemplateWithArgs")
val repl = KotlinRemoteReplCompilerClient(daemon!!, null, CompileService.TargetPlatform.JVM, emptyArray(),
TestMessageCollector(),
classpathFromClassloader(),
"kotlin.script.templates.standard.ScriptTemplateWithArgs")
val localEvaluator = GenericReplEvaluator(emptyList(), Thread.currentThread().contextClassLoader,
ScriptArgsWithTypes(arrayOf(emptyArray<String>()), arrayOf(Array<String>::class)))
@@ -627,7 +625,7 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
if (logFile.isLogContainsSequence("Idle timeout exceeded 1s")) break
Thread.sleep(200)
}
repl.dispose()
replCompiler.dispose()
Thread.sleep(200)
logFile.assertLogContainsSequence("Idle timeout exceeded 1s",
@@ -117,9 +117,9 @@ obj
val engine = ScriptEngineManager().getEngineByExtension("kts")!!
val res1 = engine.eval("val x = 3")
Assert.assertNull(res1)
val res2 = engine.eval("eval(\"\$x + 2\")")
val res2 = engine.eval("val y = eval(\"\$x + 2\")\ny")
Assert.assertEquals(5, res2)
val res3 = engine.eval("x + 4")
val res3 = engine.eval("y + 2")
Assert.assertEquals(7, res3)
}
}