Support "-no-reflect" in "kotlin" command

#KT-13491 Fixed
This commit is contained in:
Alexander Udalov
2016-08-17 13:08:41 +03:00
parent 902232c8ad
commit 3298649bd7
3 changed files with 38 additions and 4 deletions
@@ -47,7 +47,7 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
assertEquals(expectedStderr, stderr)
assertEquals(expectedExitCode.code, exitCode)
}
catch (e: Exception) {
catch (e: Throwable) {
System.err.println("exit code $exitCode")
System.err.println("<stdout>$stdout</stdout>")
System.err.println("<stderr>$stderr</stderr>")
@@ -82,4 +82,20 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
"-output", File(tmpdir, "out.js").path
)
}
fun testKotlinNoReflect() {
runProcess(
"kotlinc",
"$testDataDirectory/reflectionUsage.kt",
"-d", tmpdir.path
)
runProcess(
"kotlin",
"-cp", tmpdir.path,
"-no-reflect",
"ReflectionUsageKt",
expectedStdout = "no reflection"
)
}
}