Allow entry points without args: Array<String> (#2049)

This commit is contained in:
alexander-gorshenev
2018-09-13 10:23:02 +03:00
committed by Nikolay Igotti
parent b6a01a86f1
commit 30f5eb0bfa
5 changed files with 41 additions and 11 deletions
+11
View File
@@ -546,6 +546,17 @@ task entry2(type: LinkKonanTest) {
flags = ["-entry", "foo"]
}
task entry3(type: RunStandaloneKonanTest) {
goldValue = "Hello, without args.\n"
source = "runtime/basic/entry1.kt"
flags = ["-entry", "bar"]
}
task entry4(type: RunStandaloneKonanTest) {
goldValue = "This is main without args\n"
source = "runtime/basic/entry4.kt"
}
task readline0(type: RunStandaloneKonanTest) {
goldValue = "41"
testData = "41\r\n"
@@ -11,6 +11,10 @@ fun foo(args: Array<String>) {
println("Hello.")
}
fun bar() {
println("Hello, without args.")
}
fun main(args: Array<String>) {
fail()
@@ -0,0 +1,3 @@
fun main() {
println("This is main without args")
}