[K/N][tests] Migrate entry point runtime tests to new testing infra ^KT-61259

This commit is contained in:
Alexander Shabalin
2023-11-06 18:59:35 +01:00
committed by Space Team
parent 0ab0607bbf
commit 340103098f
26 changed files with 199 additions and 135 deletions
@@ -622,36 +622,6 @@ standaloneTest('enumEquals') {
flags = ['-XXLanguage:-ProhibitComparisonOfIncompatibleEnums', '-e', 'runtime.basic.enum_equals.main']
}
standaloneTest("entry0") {
useGoldenData = true
source = "runtime/basic/entry0.kt"
flags = ["-entry", "runtime.basic.entry0.main"]
}
standaloneTest("entry1") {
useGoldenData = true
source = "runtime/basic/entry1.kt"
flags = ["-entry", "foo"]
}
linkTest("entry2") {
useGoldenData = true
source = "runtime/basic/entry2.kt"
lib = "runtime/basic/libentry2.kt"
flags = ["-entry", "foo"]
}
standaloneTest("entry3") {
useGoldenData = true
source = "runtime/basic/entry3.kt"
flags = ["-entry", "bar"]
}
standaloneTest("entry4") {
useGoldenData = true
source = "runtime/basic/entry4.kt"
}
standaloneTest("cleaner_basic") {
enabled = !isNoopGC
source = "runtime/basic/cleaner_basic.kt"
@@ -2365,12 +2335,6 @@ tasks.register("break1", KonanLocalTest) {
source = "codegen/controlflow/break1.kt"
}
standaloneTest("args0") {
arguments = ["AAA", "BB", "C"]
useGoldenData = true
source = "runtime/basic/args0.kt"
}
standaloneTest("devirtualization_lateinitInterface") {
disabled = (cacheTesting != null) // Cache is not compatible with -opt.
useGoldenData = true
@@ -1,10 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
fun main(args : Array<String>) {
for (s in args) {
println(s)
}
}
@@ -1,3 +0,0 @@
AAA
BB
C
@@ -1,37 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package runtime.basic.entry0
fun fail() {
println("Test failed, this is a wrong main() function.")
}
fun main() {
fail()
}
fun <T> main(args: Array<String>) {
fail()
}
fun main(args: Array<Int>) {
fail()
}
fun main(args: Array<String>, second_arg: Int) {
fail()
}
class Foo {
fun main(args: Array<String>) {
fail()
}
}
fun main(args: Array<String>) {
println("Hello.")
}
@@ -1 +0,0 @@
Hello.
@@ -1,22 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
fun fail() {
println("Test failed, this is a wrong main() function.")
}
fun foo(args: Array<String>) {
println("Hello.")
}
fun bar() {
println("Hello, without args.")
}
fun main(args: Array<String>) {
fail()
}
@@ -1 +0,0 @@
Hello.
@@ -1,9 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
fun main(args: Array<String>) {
fail()
}
@@ -1 +0,0 @@
Hello.
@@ -1,22 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
fun fail() {
println("Test failed, this is a wrong main() function.")
}
fun foo(args: Array<String>) {
println("Hello.")
}
fun bar() {
println("Hello, without args.")
}
fun main(args: Array<String>) {
fail()
}
@@ -1 +0,0 @@
Hello, without args.
@@ -1,3 +0,0 @@
fun main() {
println("This is main without args")
}
@@ -1 +0,0 @@
This is main without args
@@ -1,13 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
fun fail() {
println("Test failed, this is a wrong main() function.")
}
fun foo(args: Array<String>) {
println("Hello.")
}