[PL][tests] Adapt tests for K/N to the conditions when static cache is used w/o lazy IR

This commit is contained in:
Dmitriy Dolovov
2023-06-19 14:10:09 +02:00
committed by Space Team
parent 5f3dad14a2
commit 2e43fa7cd0
9 changed files with 53 additions and 34 deletions
@@ -1,6 +1,5 @@
import abitestutils.abiTest
import abitestutils.TestBuilder
import abitestutils.TestMode.NATIVE_CACHE_STATIC_EVERYWHERE
fun box() = abiTest {
val c = Container()
@@ -61,7 +60,7 @@ private inline fun TestBuilder.unlinkedSymbol(signature: String, noinline block:
}
private inline fun TestBuilder.unlinkedTopLevelPrivateSymbol(signature: String, noinline block: () -> Unit) {
if (testMode == NATIVE_CACHE_STATIC_EVERYWHERE) {
if (testMode.lazyIr.usedEverywhere) {
val functionName = signature.removePrefix("/").substringAfterLast(".")
expectFailure(linkage("Function '$functionName' can not be called: Private function declared in module <lib1> can not be accessed in module <main>"), block)
} else