Support main entry-point without arguments in JVM

#KT-26574 In Progress
This commit is contained in:
Denis Zharkov
2018-09-06 18:24:35 +03:00
parent 2c920b732c
commit bc722f9c5f
11 changed files with 148 additions and 35 deletions
@@ -48,6 +48,27 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase {
run("hello.run", "-cp", jar, "Hello.HelloKt", "O", "K");
}
public void testHelloAppParameterlessMain() throws Exception {
String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar";
assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "hello.kt", "-d", jar));
run("hello.run", "-cp", jar, "Hello.HelloKt");
}
public void testHelloAppOldAndParameterlessMain() throws Exception {
String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar";
assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "hello.kt", "-d", jar));
run("hello.run", "-cp", jar, "Hello.HelloKt");
}
public void testHelloAppSuspendParameterlessMain() throws Exception {
String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar";
assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "hello.kt", "-d", jar));
run("hello.run", "-cp", jar, "Hello.HelloKt", "O", "K");
}
public void testCompilationFailed() throws Exception {
String jar = tmpdir.getAbsolutePath() + File.separator + "smoke.jar";