[PL][tests] K/N: Avoid any unexpected warnings to appear in tests

This commit is contained in:
Dmitriy Dolovov
2023-07-11 12:38:11 +02:00
committed by Space Team
parent 8cae224cb4
commit 19c6208cc0
8 changed files with 45 additions and 36 deletions
@@ -67,7 +67,7 @@ fun memberInfixToNonInfix(a: Int, b: Int): Int = (a.wrap() memberInfixToNonInfix
fun extensionInfixToNonInfix(a: Int, b: Int): Int = with(Wrapper.Companion) { (a.wrap() extensionInfixToNonInfix b.wrap()).unwrap() }
fun nonTailrecToTailrec(n: Int): Int = Functions.nonTailrecToTailrec(n, 1)
tailrec fun tailrecToNonTailrec(n: Int): Int = Functions.tailrecToNonTailrec(n, 1)
@Suppress("NO_TAIL_CALLS_FOUND") tailrec fun tailrecToNonTailrec(n: Int): Int = Functions.tailrecToNonTailrec(n, 1)
// This is required to check that default arguments are counter correctly even for inherited classes.
open class StableOpenClass {
@@ -61,8 +61,8 @@ fun box() = abiTest {
expectSuccess(91) { varargArgumentAndOtherArgumentsWithDefaultValues(100, 1) }
expectSuccess(93) { varargArgumentAndOtherArgumentsWithDefaultValues(100, 1, 2) }
expectSuccess(113) { varargArgumentAndOtherArgumentsWithDefaultValues(100, 1, 2, last = 10) }
expectSuccess(-109) { varargArgumentAndOtherArgumentsWithDefaultValues(elements = *intArrayOf(1)) }
expectSuccess(-107) { varargArgumentAndOtherArgumentsWithDefaultValues(elements = *intArrayOf(1, 2)) }
expectSuccess(-109) { @Suppress("REDUNDANT_SPREAD_OPERATOR_IN_NAMED_FORM_IN_FUNCTION") varargArgumentAndOtherArgumentsWithDefaultValues(elements = *intArrayOf(1)) }
expectSuccess(-107) { @Suppress("REDUNDANT_SPREAD_OPERATOR_IN_NAMED_FORM_IN_FUNCTION") varargArgumentAndOtherArgumentsWithDefaultValues(elements = *intArrayOf(1, 2)) }
expectSuccess(104) { varargArgumentWithDefaultValueAndOtherArguments(100, last = 10) }
expectSuccess(111) { varargArgumentWithDefaultValueAndOtherArguments(100, 1, last = 10) }
expectSuccess(113) { varargArgumentWithDefaultValueAndOtherArguments(100, 1, 2, last = 10) }
@@ -74,8 +74,8 @@ fun box() = abiTest {
expectSuccess(91) { varargArgumentWithDefaultValueAndOtherArgumentsWithDefaultValues(100, 1) }
expectSuccess(93) { varargArgumentWithDefaultValueAndOtherArgumentsWithDefaultValues(100, 1, 2) }
expectSuccess(113) { varargArgumentWithDefaultValueAndOtherArgumentsWithDefaultValues(100, 1, 2, last = 10) }
expectSuccess(-109) { varargArgumentWithDefaultValueAndOtherArgumentsWithDefaultValues(elements = *intArrayOf(1)) }
expectSuccess(-107) { varargArgumentWithDefaultValueAndOtherArgumentsWithDefaultValues(elements = *intArrayOf(1, 2)) }
expectSuccess(-109) { @Suppress("REDUNDANT_SPREAD_OPERATOR_IN_NAMED_FORM_IN_FUNCTION") varargArgumentWithDefaultValueAndOtherArgumentsWithDefaultValues(elements = *intArrayOf(1)) }
expectSuccess(-107) { @Suppress("REDUNDANT_SPREAD_OPERATOR_IN_NAMED_FORM_IN_FUNCTION") varargArgumentWithDefaultValueAndOtherArgumentsWithDefaultValues(elements = *intArrayOf(1, 2)) }
expectSuccess(-1) { suspendToNonSuspendFunction1(1) }
expectSuccess(-2) { suspendToNonSuspendFunction2(2) }