[Commonizer] Reformat tests
This commit is contained in:
+30
-9
@@ -13,31 +13,52 @@ import org.junit.Test
|
|||||||
class EqualizingVisibilityCommonizerTest : AbstractCommonizerTest<CirDeclarationWithVisibility, Visibility>() {
|
class EqualizingVisibilityCommonizerTest : AbstractCommonizerTest<CirDeclarationWithVisibility, Visibility>() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun publicOnly() = doTestSuccess(PUBLIC, PUBLIC.toMock(), PUBLIC.toMock(), PUBLIC.toMock())
|
fun publicOnly() = doTestSuccess(
|
||||||
|
expected = PUBLIC,
|
||||||
|
PUBLIC.toMock(), PUBLIC.toMock(), PUBLIC.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun protectedOnly() = doTestSuccess(PROTECTED, PROTECTED.toMock(), PROTECTED.toMock(), PROTECTED.toMock())
|
fun protectedOnly() = doTestSuccess(
|
||||||
|
expected = PROTECTED,
|
||||||
|
PROTECTED.toMock(), PROTECTED.toMock(), PROTECTED.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun internalOnly() = doTestSuccess(INTERNAL, INTERNAL.toMock(), INTERNAL.toMock(), INTERNAL.toMock())
|
fun internalOnly() = doTestSuccess(
|
||||||
|
expected = INTERNAL,
|
||||||
|
INTERNAL.toMock(), INTERNAL.toMock(), INTERNAL.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun privateOnly() = doTestFailure(PRIVATE.toMock())
|
fun privateOnly() = doTestFailure(
|
||||||
|
PRIVATE.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndProtected() = doTestFailure(PROTECTED.toMock(), PROTECTED.toMock(), PUBLIC.toMock())
|
fun publicAndProtected() = doTestFailure(
|
||||||
|
PROTECTED.toMock(), PROTECTED.toMock(), PUBLIC.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndInternal() = doTestFailure(INTERNAL.toMock(), INTERNAL.toMock(), PUBLIC.toMock())
|
fun publicAndInternal() = doTestFailure(
|
||||||
|
INTERNAL.toMock(), INTERNAL.toMock(), PUBLIC.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun protectedAndInternal() = doTestFailure(PROTECTED.toMock(), PROTECTED.toMock(), INTERNAL.toMock())
|
fun protectedAndInternal() = doTestFailure(
|
||||||
|
PROTECTED.toMock(), PROTECTED.toMock(), INTERNAL.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndPrivate() = doTestFailure(PUBLIC.toMock(), PUBLIC.toMock(), PRIVATE.toMock())
|
fun publicAndPrivate() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), PUBLIC.toMock(), PRIVATE.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun somethingUnexpected() = doTestFailure(PUBLIC.toMock(), LOCAL.toMock())
|
fun somethingUnexpected() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), LOCAL.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
override fun createCommonizer() = VisibilityCommonizer.equalizing()
|
override fun createCommonizer() = VisibilityCommonizer.equalizing()
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-5
@@ -15,15 +15,13 @@ class ExtensionReceiverCommonizerTest : AbstractCommonizerTest<CirExtensionRecei
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun nullReceiver() = doTestSuccess(
|
fun nullReceiver() = doTestSuccess(
|
||||||
null,
|
expected = null,
|
||||||
null,
|
null, null, null
|
||||||
null,
|
|
||||||
null
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun sameReceiver() = doTestSuccess(
|
fun sameReceiver() = doTestSuccess(
|
||||||
mockExtensionReceiver("kotlin.String"),
|
expected = mockExtensionReceiver("kotlin.String"),
|
||||||
mockExtensionReceiver("kotlin.String"),
|
mockExtensionReceiver("kotlin.String"),
|
||||||
mockExtensionReceiver("kotlin.String"),
|
mockExtensionReceiver("kotlin.String"),
|
||||||
mockExtensionReceiver("kotlin.String")
|
mockExtensionReceiver("kotlin.String")
|
||||||
|
|||||||
+17
-17
@@ -13,7 +13,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allDefault() = doTestSuccess(
|
fun allDefault() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(),
|
mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(),
|
mockFunctionModifiers(),
|
||||||
mockFunctionModifiers()
|
mockFunctionModifiers()
|
||||||
@@ -21,7 +21,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allSuspend() = doTestSuccess(
|
fun allSuspend() = doTestSuccess(
|
||||||
mockFunctionModifiers(isSuspend = true),
|
expected = mockFunctionModifiers(isSuspend = true),
|
||||||
mockFunctionModifiers(isSuspend = true),
|
mockFunctionModifiers(isSuspend = true),
|
||||||
mockFunctionModifiers(isSuspend = true),
|
mockFunctionModifiers(isSuspend = true),
|
||||||
mockFunctionModifiers(isSuspend = true)
|
mockFunctionModifiers(isSuspend = true)
|
||||||
@@ -43,7 +43,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allOperator() = doTestSuccess(
|
fun allOperator() = doTestSuccess(
|
||||||
mockFunctionModifiers(isOperator = true),
|
expected = mockFunctionModifiers(isOperator = true),
|
||||||
mockFunctionModifiers(isOperator = true),
|
mockFunctionModifiers(isOperator = true),
|
||||||
mockFunctionModifiers(isOperator = true),
|
mockFunctionModifiers(isOperator = true),
|
||||||
mockFunctionModifiers(isOperator = true)
|
mockFunctionModifiers(isOperator = true)
|
||||||
@@ -51,7 +51,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun notOperatorAndOperator() = doTestSuccess(
|
fun notOperatorAndOperator() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(),
|
mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isOperator = true),
|
mockFunctionModifiers(isOperator = true),
|
||||||
mockFunctionModifiers(isOperator = true)
|
mockFunctionModifiers(isOperator = true)
|
||||||
@@ -59,7 +59,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun operatorAndNotOperator() = doTestSuccess(
|
fun operatorAndNotOperator() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isOperator = true),
|
mockFunctionModifiers(isOperator = true),
|
||||||
mockFunctionModifiers(isOperator = true),
|
mockFunctionModifiers(isOperator = true),
|
||||||
mockFunctionModifiers()
|
mockFunctionModifiers()
|
||||||
@@ -67,7 +67,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allInfix() = doTestSuccess(
|
fun allInfix() = doTestSuccess(
|
||||||
mockFunctionModifiers(isInfix = true),
|
expected = mockFunctionModifiers(isInfix = true),
|
||||||
mockFunctionModifiers(isInfix = true),
|
mockFunctionModifiers(isInfix = true),
|
||||||
mockFunctionModifiers(isInfix = true),
|
mockFunctionModifiers(isInfix = true),
|
||||||
mockFunctionModifiers(isInfix = true)
|
mockFunctionModifiers(isInfix = true)
|
||||||
@@ -75,7 +75,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun notInfixAndInfix() = doTestSuccess(
|
fun notInfixAndInfix() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(),
|
mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isInfix = true),
|
mockFunctionModifiers(isInfix = true),
|
||||||
mockFunctionModifiers(isInfix = true)
|
mockFunctionModifiers(isInfix = true)
|
||||||
@@ -83,7 +83,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun infixAndNotInfix() = doTestSuccess(
|
fun infixAndNotInfix() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isInfix = true),
|
mockFunctionModifiers(isInfix = true),
|
||||||
mockFunctionModifiers(isInfix = true),
|
mockFunctionModifiers(isInfix = true),
|
||||||
mockFunctionModifiers()
|
mockFunctionModifiers()
|
||||||
@@ -91,7 +91,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allInline() = doTestSuccess(
|
fun allInline() = doTestSuccess(
|
||||||
mockFunctionModifiers(isInline = true),
|
expected = mockFunctionModifiers(isInline = true),
|
||||||
mockFunctionModifiers(isInline = true),
|
mockFunctionModifiers(isInline = true),
|
||||||
mockFunctionModifiers(isInline = true),
|
mockFunctionModifiers(isInline = true),
|
||||||
mockFunctionModifiers(isInline = true)
|
mockFunctionModifiers(isInline = true)
|
||||||
@@ -99,7 +99,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun notInlineAndInline() = doTestSuccess(
|
fun notInlineAndInline() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(),
|
mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isInline = true),
|
mockFunctionModifiers(isInline = true),
|
||||||
mockFunctionModifiers(isInline = true)
|
mockFunctionModifiers(isInline = true)
|
||||||
@@ -107,7 +107,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun inlineAndNotInline() = doTestSuccess(
|
fun inlineAndNotInline() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isInline = true),
|
mockFunctionModifiers(isInline = true),
|
||||||
mockFunctionModifiers(isInline = true),
|
mockFunctionModifiers(isInline = true),
|
||||||
mockFunctionModifiers()
|
mockFunctionModifiers()
|
||||||
@@ -115,7 +115,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allTailrec() = doTestSuccess(
|
fun allTailrec() = doTestSuccess(
|
||||||
mockFunctionModifiers(isTailrec = true),
|
expected = mockFunctionModifiers(isTailrec = true),
|
||||||
mockFunctionModifiers(isTailrec = true),
|
mockFunctionModifiers(isTailrec = true),
|
||||||
mockFunctionModifiers(isTailrec = true),
|
mockFunctionModifiers(isTailrec = true),
|
||||||
mockFunctionModifiers(isTailrec = true)
|
mockFunctionModifiers(isTailrec = true)
|
||||||
@@ -123,7 +123,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun notTailrecAndTailrec() = doTestSuccess(
|
fun notTailrecAndTailrec() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(),
|
mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isTailrec = true),
|
mockFunctionModifiers(isTailrec = true),
|
||||||
mockFunctionModifiers(isTailrec = true)
|
mockFunctionModifiers(isTailrec = true)
|
||||||
@@ -131,7 +131,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun tailrecAndNotTailrec() = doTestSuccess(
|
fun tailrecAndNotTailrec() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isTailrec = true),
|
mockFunctionModifiers(isTailrec = true),
|
||||||
mockFunctionModifiers(isTailrec = true),
|
mockFunctionModifiers(isTailrec = true),
|
||||||
mockFunctionModifiers()
|
mockFunctionModifiers()
|
||||||
@@ -139,7 +139,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allExternal() = doTestSuccess(
|
fun allExternal() = doTestSuccess(
|
||||||
mockFunctionModifiers(isExternal = true),
|
expected = mockFunctionModifiers(isExternal = true),
|
||||||
mockFunctionModifiers(isExternal = true),
|
mockFunctionModifiers(isExternal = true),
|
||||||
mockFunctionModifiers(isExternal = true),
|
mockFunctionModifiers(isExternal = true),
|
||||||
mockFunctionModifiers(isExternal = true)
|
mockFunctionModifiers(isExternal = true)
|
||||||
@@ -147,7 +147,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun notExternalAndExternal() = doTestSuccess(
|
fun notExternalAndExternal() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(),
|
mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isExternal = true),
|
mockFunctionModifiers(isExternal = true),
|
||||||
mockFunctionModifiers(isExternal = true)
|
mockFunctionModifiers(isExternal = true)
|
||||||
@@ -155,7 +155,7 @@ class FunctionModifiersCommonizerTest : AbstractCommonizerTest<CirFunctionModifi
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun externalAndNotExternal() = doTestSuccess(
|
fun externalAndNotExternal() = doTestSuccess(
|
||||||
mockFunctionModifiers(),
|
expected = mockFunctionModifiers(),
|
||||||
mockFunctionModifiers(isExternal = true),
|
mockFunctionModifiers(isExternal = true),
|
||||||
mockFunctionModifiers(isExternal = true),
|
mockFunctionModifiers(isExternal = true),
|
||||||
mockFunctionModifiers()
|
mockFunctionModifiers()
|
||||||
|
|||||||
+75
-22
@@ -16,16 +16,27 @@ abstract class LoweringVisibilityCommonizerTest(
|
|||||||
) : AbstractCommonizerTest<CirDeclarationWithVisibility, Visibility>() {
|
) : AbstractCommonizerTest<CirDeclarationWithVisibility, Visibility>() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun publicOnly() = doTestSuccess(PUBLIC, PUBLIC.toMock(), PUBLIC.toMock(), PUBLIC.toMock())
|
fun publicOnly() = doTestSuccess(
|
||||||
|
expected = PUBLIC,
|
||||||
|
PUBLIC.toMock(), PUBLIC.toMock(), PUBLIC.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun protectedOnly() = doTestSuccess(PROTECTED, PROTECTED.toMock(), PROTECTED.toMock(), PROTECTED.toMock())
|
fun protectedOnly() = doTestSuccess(
|
||||||
|
expected = PROTECTED,
|
||||||
|
PROTECTED.toMock(), PROTECTED.toMock(), PROTECTED.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun internalOnly() = doTestSuccess(INTERNAL, INTERNAL.toMock(), INTERNAL.toMock(), INTERNAL.toMock())
|
fun internalOnly() = doTestSuccess(
|
||||||
|
expected = INTERNAL,
|
||||||
|
INTERNAL.toMock(), INTERNAL.toMock(), INTERNAL.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun somethingUnexpected() = doTestFailure(PUBLIC.toMock(), LOCAL.toMock())
|
fun somethingUnexpected() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), LOCAL.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
final override fun createCommonizer() = VisibilityCommonizer.lowering(allowPrivate = allowPrivate)
|
final override fun createCommonizer() = VisibilityCommonizer.lowering(allowPrivate = allowPrivate)
|
||||||
|
|
||||||
@@ -47,63 +58,105 @@ abstract class LoweringVisibilityCommonizerTest(
|
|||||||
class PrivateMembers : LoweringVisibilityCommonizerTest(true, false) {
|
class PrivateMembers : LoweringVisibilityCommonizerTest(true, false) {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun publicAndProtected() = doTestSuccess(PROTECTED, PUBLIC.toMock(), PROTECTED.toMock(), PUBLIC.toMock())
|
fun publicAndProtected() = doTestSuccess(
|
||||||
|
expected = PROTECTED,
|
||||||
|
PUBLIC.toMock(), PROTECTED.toMock(), PUBLIC.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun publicAndInternal() = doTestSuccess(INTERNAL, PUBLIC.toMock(), INTERNAL.toMock(), PUBLIC.toMock())
|
fun publicAndInternal() = doTestSuccess(
|
||||||
|
expected = INTERNAL,
|
||||||
|
PUBLIC.toMock(), INTERNAL.toMock(), PUBLIC.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndInternalAndProtected() = doTestFailure(PUBLIC.toMock(), INTERNAL.toMock(), PROTECTED.toMock())
|
fun publicAndInternalAndProtected() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), INTERNAL.toMock(), PROTECTED.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun publicAndInternalAndPrivate() = doTestSuccess(PRIVATE, PUBLIC.toMock(), INTERNAL.toMock(), PRIVATE.toMock())
|
fun publicAndInternalAndPrivate() = doTestSuccess(
|
||||||
|
expected = PRIVATE,
|
||||||
|
PUBLIC.toMock(), INTERNAL.toMock(), PRIVATE.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun privateOnly() = doTestSuccess(PRIVATE, PRIVATE.toMock(), PRIVATE.toMock(), PRIVATE.toMock())
|
fun privateOnly() = doTestSuccess(
|
||||||
|
expected = PRIVATE,
|
||||||
|
PRIVATE.toMock(), PRIVATE.toMock(), PRIVATE.toMock()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
class NonVirtualMembers : LoweringVisibilityCommonizerTest(false, false) {
|
class NonVirtualMembers : LoweringVisibilityCommonizerTest(false, false) {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun publicAndProtected() = doTestSuccess(PROTECTED, PUBLIC.toMock(), PROTECTED.toMock(), PUBLIC.toMock())
|
fun publicAndProtected() = doTestSuccess(
|
||||||
|
expected = PROTECTED,
|
||||||
|
PUBLIC.toMock(), PROTECTED.toMock(), PUBLIC.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun publicAndInternal() = doTestSuccess(INTERNAL, PUBLIC.toMock(), INTERNAL.toMock(), PUBLIC.toMock())
|
fun publicAndInternal() = doTestSuccess(
|
||||||
|
expected = INTERNAL,
|
||||||
|
PUBLIC.toMock(), INTERNAL.toMock(), PUBLIC.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndInternalAndProtected() = doTestFailure(PUBLIC.toMock(), INTERNAL.toMock(), PROTECTED.toMock())
|
fun publicAndInternalAndProtected() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), INTERNAL.toMock(), PROTECTED.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndInternalAndPrivate() = doTestFailure(PUBLIC.toMock(), INTERNAL.toMock(), PRIVATE.toMock())
|
fun publicAndInternalAndPrivate() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), INTERNAL.toMock(), PRIVATE.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun privateOnly() = doTestFailure(PRIVATE.toMock())
|
fun privateOnly() = doTestFailure(
|
||||||
|
PRIVATE.toMock()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
class VirtualMembers : LoweringVisibilityCommonizerTest(false, true) {
|
class VirtualMembers : LoweringVisibilityCommonizerTest(false, true) {
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndProtected1() = doTestFailure(PUBLIC.toMock(), PROTECTED.toMock())
|
fun publicAndProtected1() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), PROTECTED.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndProtected2() = doTestFailure(PUBLIC.toMock(), PUBLIC.toMock(), PROTECTED.toMock())
|
fun publicAndProtected2() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), PUBLIC.toMock(), PROTECTED.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndInternal1() = doTestFailure(PUBLIC.toMock(), INTERNAL.toMock())
|
fun publicAndInternal1() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), INTERNAL.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndInternal2() = doTestFailure(PUBLIC.toMock(), PUBLIC.toMock(), INTERNAL.toMock())
|
fun publicAndInternal2() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), PUBLIC.toMock(), INTERNAL.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun protectedAndInternal1() = doTestFailure(PROTECTED.toMock(), INTERNAL.toMock())
|
fun protectedAndInternal1() = doTestFailure(
|
||||||
|
PROTECTED.toMock(), INTERNAL.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun protectedAndInternal2() = doTestFailure(PROTECTED.toMock(), PROTECTED.toMock(), INTERNAL.toMock())
|
fun protectedAndInternal2() = doTestFailure(
|
||||||
|
PROTECTED.toMock(), PROTECTED.toMock(), INTERNAL.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndPrivate() = doTestFailure(PUBLIC.toMock(), PRIVATE.toMock())
|
fun publicAndPrivate() = doTestFailure(
|
||||||
|
PUBLIC.toMock(), PRIVATE.toMock()
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun privateOnly() = doTestFailure(PRIVATE.toMock())
|
fun privateOnly() = doTestFailure(
|
||||||
|
PRIVATE.toMock()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+33
-9
@@ -12,31 +12,55 @@ import org.junit.Test
|
|||||||
class ModalityCommonizerTest : AbstractCommonizerTest<Modality, Modality>() {
|
class ModalityCommonizerTest : AbstractCommonizerTest<Modality, Modality>() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun onlyFinal() = doTestSuccess(FINAL, FINAL, FINAL, FINAL)
|
fun onlyFinal() = doTestSuccess(
|
||||||
|
expected = FINAL,
|
||||||
|
FINAL, FINAL, FINAL
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun onlyOpen() = doTestSuccess(OPEN, OPEN, OPEN, OPEN)
|
fun onlyOpen() = doTestSuccess(
|
||||||
|
expected = OPEN,
|
||||||
|
OPEN, OPEN, OPEN
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun onlySealed() = doTestSuccess(SEALED, SEALED, SEALED, SEALED)
|
fun onlySealed() = doTestSuccess(
|
||||||
|
expected = SEALED,
|
||||||
|
SEALED, SEALED, SEALED
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun onlyAbstract() = doTestSuccess(ABSTRACT, ABSTRACT, ABSTRACT, ABSTRACT)
|
fun onlyAbstract() = doTestSuccess(
|
||||||
|
expected = ABSTRACT,
|
||||||
|
ABSTRACT, ABSTRACT, ABSTRACT
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun sealedAndAbstract() = doTestFailure(SEALED, ABSTRACT)
|
fun sealedAndAbstract() = doTestFailure(
|
||||||
|
SEALED, ABSTRACT
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun sealedAndFinal() = doTestFailure(SEALED, FINAL)
|
fun sealedAndFinal() = doTestFailure(
|
||||||
|
SEALED, FINAL
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun abstractAndFinal() = doTestFailure(ABSTRACT, FINAL)
|
fun abstractAndFinal() = doTestFailure(
|
||||||
|
ABSTRACT, FINAL
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun finalAndOpen() = doTestSuccess(FINAL, FINAL, OPEN, FINAL)
|
fun finalAndOpen() = doTestSuccess(
|
||||||
|
expected = FINAL,
|
||||||
|
FINAL, OPEN, FINAL
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun openAndFinal() = doTestSuccess(FINAL, OPEN, OPEN, FINAL)
|
fun openAndFinal() = doTestSuccess(
|
||||||
|
expected = FINAL,
|
||||||
|
OPEN, OPEN, FINAL
|
||||||
|
)
|
||||||
|
|
||||||
override fun createCommonizer() = ModalityCommonizer()
|
override fun createCommonizer() = ModalityCommonizer()
|
||||||
}
|
}
|
||||||
|
|||||||
+47
-15
@@ -13,50 +13,82 @@ import org.junit.Test
|
|||||||
class PropertySetterCommonizerTest : AbstractCommonizerTest<CirSetter?, CirSetter?>() {
|
class PropertySetterCommonizerTest : AbstractCommonizerTest<CirSetter?, CirSetter?>() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun absentOnly() = super.doTestSuccess(null, null, null, null)
|
fun absentOnly() = super.doTestSuccess(
|
||||||
|
expected = null,
|
||||||
|
null, null, null
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun absentAndPublic() = doTestFailure(null, null, null, PUBLIC)
|
fun absentAndPublic() = doTestFailure(
|
||||||
|
null, null, null, PUBLIC
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndAbsent() = doTestFailure(PUBLIC, PUBLIC, PUBLIC, null)
|
fun publicAndAbsent() = doTestFailure(
|
||||||
|
PUBLIC, PUBLIC, PUBLIC, null
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun protectedAndAbsent() = doTestFailure(PROTECTED, PROTECTED, null)
|
fun protectedAndAbsent() = doTestFailure(
|
||||||
|
PROTECTED, PROTECTED, null
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun absentAndInternal() = doTestFailure(null, null, INTERNAL)
|
fun absentAndInternal() = doTestFailure(
|
||||||
|
null, null, INTERNAL
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun publicOnly() = doTestSuccess(PUBLIC, PUBLIC, PUBLIC, PUBLIC)
|
fun publicOnly() = doTestSuccess(
|
||||||
|
expected = PUBLIC,
|
||||||
|
PUBLIC, PUBLIC, PUBLIC
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun protectedOnly() = doTestSuccess(PROTECTED, PROTECTED, PROTECTED, PROTECTED)
|
fun protectedOnly() = doTestSuccess(
|
||||||
|
expected = PROTECTED,
|
||||||
|
PROTECTED, PROTECTED, PROTECTED
|
||||||
|
)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun internalOnly() = doTestSuccess(INTERNAL, INTERNAL, INTERNAL, INTERNAL)
|
fun internalOnly() = doTestSuccess(
|
||||||
|
expected = INTERNAL,
|
||||||
|
INTERNAL, INTERNAL, INTERNAL
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun privateOnly() = doTestFailure(PRIVATE)
|
fun privateOnly() = doTestFailure(
|
||||||
|
PRIVATE
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndProtected() = doTestFailure(PUBLIC, PUBLIC, PROTECTED)
|
fun publicAndProtected() = doTestFailure(
|
||||||
|
PUBLIC, PUBLIC, PROTECTED
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndInternal() = doTestFailure(PUBLIC, PUBLIC, INTERNAL)
|
fun publicAndInternal() = doTestFailure(
|
||||||
|
PUBLIC, PUBLIC, INTERNAL
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun protectedAndInternal() = doTestFailure(PROTECTED, PROTECTED, INTERNAL)
|
fun protectedAndInternal() = doTestFailure(
|
||||||
|
PROTECTED, PROTECTED, INTERNAL
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun publicAndPrivate() = doTestFailure(PUBLIC, PUBLIC, PRIVATE)
|
fun publicAndPrivate() = doTestFailure(
|
||||||
|
PUBLIC, PUBLIC, PRIVATE
|
||||||
|
)
|
||||||
|
|
||||||
@Test(expected = IllegalCommonizerStateException::class)
|
@Test(expected = IllegalCommonizerStateException::class)
|
||||||
fun somethingUnexpected() = doTestFailure(PUBLIC, LOCAL)
|
fun somethingUnexpected() = doTestFailure(
|
||||||
|
PUBLIC, LOCAL
|
||||||
|
)
|
||||||
|
|
||||||
private fun doTestSuccess(expected: Visibility?, vararg variants: Visibility?) =
|
private fun doTestSuccess(expected: Visibility?, vararg variants: Visibility?) =
|
||||||
super.doTestSuccess(
|
super.doTestSuccess(
|
||||||
expected?.let { CirSetter.createDefaultNoAnnotations(expected) },
|
expected = expected?.let { CirSetter.createDefaultNoAnnotations(expected) },
|
||||||
*variants.map { it?.let(CirSetter.Companion::createDefaultNoAnnotations) }.toTypedArray()
|
*variants.map { it?.let(CirSetter.Companion::createDefaultNoAnnotations) }.toTypedArray()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -22,7 +22,7 @@ class RootCommonizerTest : AbstractCommonizerTest<CirRoot, CirRoot>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allAreNative() = doTestSuccess(
|
fun allAreNative() = doTestSuccess(
|
||||||
KONAN_BUILT_INS.toMock(
|
expected = KONAN_BUILT_INS.toMock(
|
||||||
OutputTarget(
|
OutputTarget(
|
||||||
setOf(
|
setOf(
|
||||||
InputTarget("ios_x64", KonanTarget.IOS_X64),
|
InputTarget("ios_x64", KonanTarget.IOS_X64),
|
||||||
@@ -38,7 +38,7 @@ class RootCommonizerTest : AbstractCommonizerTest<CirRoot, CirRoot>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun jvmAndNative1() = doTestSuccess(
|
fun jvmAndNative1() = doTestSuccess(
|
||||||
DEFAULT_BUILT_INS.toMock(
|
expected = DEFAULT_BUILT_INS.toMock(
|
||||||
OutputTarget(
|
OutputTarget(
|
||||||
setOf(
|
setOf(
|
||||||
InputTarget("jvm1"),
|
InputTarget("jvm1"),
|
||||||
@@ -54,7 +54,7 @@ class RootCommonizerTest : AbstractCommonizerTest<CirRoot, CirRoot>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun jvmAndNative2() = doTestSuccess(
|
fun jvmAndNative2() = doTestSuccess(
|
||||||
DEFAULT_BUILT_INS.toMock(
|
expected = DEFAULT_BUILT_INS.toMock(
|
||||||
OutputTarget(
|
OutputTarget(
|
||||||
setOf(
|
setOf(
|
||||||
InputTarget("ios_x64", KonanTarget.IOS_X64),
|
InputTarget("ios_x64", KonanTarget.IOS_X64),
|
||||||
@@ -70,7 +70,7 @@ class RootCommonizerTest : AbstractCommonizerTest<CirRoot, CirRoot>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun noNative1() = doTestSuccess(
|
fun noNative1() = doTestSuccess(
|
||||||
DEFAULT_BUILT_INS.toMock(
|
expected = DEFAULT_BUILT_INS.toMock(
|
||||||
OutputTarget(
|
OutputTarget(
|
||||||
setOf(
|
setOf(
|
||||||
InputTarget("default1"),
|
InputTarget("default1"),
|
||||||
@@ -86,7 +86,7 @@ class RootCommonizerTest : AbstractCommonizerTest<CirRoot, CirRoot>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun noNative2() = doTestSuccess(
|
fun noNative2() = doTestSuccess(
|
||||||
DEFAULT_BUILT_INS.toMock(
|
expected = DEFAULT_BUILT_INS.toMock(
|
||||||
OutputTarget(
|
OutputTarget(
|
||||||
setOf(
|
setOf(
|
||||||
InputTarget("jvm1"),
|
InputTarget("jvm1"),
|
||||||
@@ -102,7 +102,7 @@ class RootCommonizerTest : AbstractCommonizerTest<CirRoot, CirRoot>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun noNative3() = doTestSuccess(
|
fun noNative3() = doTestSuccess(
|
||||||
DEFAULT_BUILT_INS.toMock(
|
expected = DEFAULT_BUILT_INS.toMock(
|
||||||
OutputTarget(
|
OutputTarget(
|
||||||
setOf(
|
setOf(
|
||||||
InputTarget("jvm1"),
|
InputTarget("jvm1"),
|
||||||
@@ -118,7 +118,7 @@ class RootCommonizerTest : AbstractCommonizerTest<CirRoot, CirRoot>() {
|
|||||||
|
|
||||||
@Test(expected = IllegalStateException::class)
|
@Test(expected = IllegalStateException::class)
|
||||||
fun misconfiguration1() = doTestSuccess(
|
fun misconfiguration1() = doTestSuccess(
|
||||||
KONAN_BUILT_INS.toMock(
|
expected = KONAN_BUILT_INS.toMock(
|
||||||
OutputTarget(
|
OutputTarget(
|
||||||
setOf(
|
setOf(
|
||||||
InputTarget("ios_x64", KonanTarget.IOS_X64),
|
InputTarget("ios_x64", KonanTarget.IOS_X64),
|
||||||
@@ -134,7 +134,7 @@ class RootCommonizerTest : AbstractCommonizerTest<CirRoot, CirRoot>() {
|
|||||||
|
|
||||||
@Test(expected = IllegalStateException::class)
|
@Test(expected = IllegalStateException::class)
|
||||||
fun misconfiguration2() = doTestSuccess(
|
fun misconfiguration2() = doTestSuccess(
|
||||||
DEFAULT_BUILT_INS.toMock(
|
expected = DEFAULT_BUILT_INS.toMock(
|
||||||
OutputTarget(
|
OutputTarget(
|
||||||
setOf(
|
setOf(
|
||||||
InputTarget("jvm1"),
|
InputTarget("jvm1"),
|
||||||
|
|||||||
+17
-17
@@ -33,7 +33,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun classTypesInKotlinPackageWithSameName() = doTestSuccess(
|
fun classTypesInKotlinPackageWithSameName() = doTestSuccess(
|
||||||
mockClassType("kotlin.collections.List"),
|
expected = mockClassType("kotlin.collections.List"),
|
||||||
mockClassType("kotlin.collections.List"),
|
mockClassType("kotlin.collections.List"),
|
||||||
mockClassType("kotlin.collections.List"),
|
mockClassType("kotlin.collections.List"),
|
||||||
mockClassType("kotlin.collections.List")
|
mockClassType("kotlin.collections.List")
|
||||||
@@ -62,7 +62,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun classTypesInKotlinxPackageWithSameName() = doTestSuccess(
|
fun classTypesInKotlinxPackageWithSameName() = doTestSuccess(
|
||||||
mockClassType("kotlinx.cinterop.CPointer"),
|
expected = mockClassType("kotlinx.cinterop.CPointer"),
|
||||||
mockClassType("kotlinx.cinterop.CPointer"),
|
mockClassType("kotlinx.cinterop.CPointer"),
|
||||||
mockClassType("kotlinx.cinterop.CPointer"),
|
mockClassType("kotlinx.cinterop.CPointer"),
|
||||||
mockClassType("kotlinx.cinterop.CPointer")
|
mockClassType("kotlinx.cinterop.CPointer")
|
||||||
@@ -91,7 +91,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun classTypesInUserPackageWithSameName() = doTestSuccess(
|
fun classTypesInUserPackageWithSameName() = doTestSuccess(
|
||||||
mockClassType("org.sample.Foo"),
|
expected = mockClassType("org.sample.Foo"),
|
||||||
mockClassType("org.sample.Foo"),
|
mockClassType("org.sample.Foo"),
|
||||||
mockClassType("org.sample.Foo"),
|
mockClassType("org.sample.Foo"),
|
||||||
mockClassType("org.sample.Foo")
|
mockClassType("org.sample.Foo")
|
||||||
@@ -120,7 +120,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun classTypesInKotlinPackageWithSameNullability1() = doTestSuccess(
|
fun classTypesInKotlinPackageWithSameNullability1() = doTestSuccess(
|
||||||
mockClassType("kotlin.collections.List"),
|
expected = mockClassType("kotlin.collections.List"),
|
||||||
mockClassType("kotlin.collections.List", nullable = false),
|
mockClassType("kotlin.collections.List", nullable = false),
|
||||||
mockClassType("kotlin.collections.List", nullable = false),
|
mockClassType("kotlin.collections.List", nullable = false),
|
||||||
mockClassType("kotlin.collections.List", nullable = false)
|
mockClassType("kotlin.collections.List", nullable = false)
|
||||||
@@ -128,7 +128,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun classTypesInKotlinPackageWithSameNullability2() = doTestSuccess(
|
fun classTypesInKotlinPackageWithSameNullability2() = doTestSuccess(
|
||||||
mockClassType("kotlin.collections.List", nullable = true),
|
expected = mockClassType("kotlin.collections.List", nullable = true),
|
||||||
mockClassType("kotlin.collections.List", nullable = true),
|
mockClassType("kotlin.collections.List", nullable = true),
|
||||||
mockClassType("kotlin.collections.List", nullable = true),
|
mockClassType("kotlin.collections.List", nullable = true),
|
||||||
mockClassType("kotlin.collections.List", nullable = true)
|
mockClassType("kotlin.collections.List", nullable = true)
|
||||||
@@ -150,7 +150,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun classTypesInUserPackageWithSameNullability1() = doTestSuccess(
|
fun classTypesInUserPackageWithSameNullability1() = doTestSuccess(
|
||||||
mockClassType("org.sample.Foo"),
|
expected = mockClassType("org.sample.Foo"),
|
||||||
mockClassType("org.sample.Foo", nullable = false),
|
mockClassType("org.sample.Foo", nullable = false),
|
||||||
mockClassType("org.sample.Foo", nullable = false),
|
mockClassType("org.sample.Foo", nullable = false),
|
||||||
mockClassType("org.sample.Foo", nullable = false)
|
mockClassType("org.sample.Foo", nullable = false)
|
||||||
@@ -158,7 +158,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun classTypesInUserPackageWithSameNullability2() = doTestSuccess(
|
fun classTypesInUserPackageWithSameNullability2() = doTestSuccess(
|
||||||
mockClassType("org.sample.Foo", nullable = true),
|
expected = mockClassType("org.sample.Foo", nullable = true),
|
||||||
mockClassType("org.sample.Foo", nullable = true),
|
mockClassType("org.sample.Foo", nullable = true),
|
||||||
mockClassType("org.sample.Foo", nullable = true),
|
mockClassType("org.sample.Foo", nullable = true),
|
||||||
mockClassType("org.sample.Foo", nullable = true)
|
mockClassType("org.sample.Foo", nullable = true)
|
||||||
@@ -180,7 +180,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun taTypesInKotlinPackageWithSameNameAndClass() = doTestSuccess(
|
fun taTypesInKotlinPackageWithSameNameAndClass() = doTestSuccess(
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
expected = mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") }
|
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") }
|
||||||
@@ -202,7 +202,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun taTypesInKotlinxPackageWithSameNameAndClass() = doTestSuccess(
|
fun taTypesInKotlinxPackageWithSameNameAndClass() = doTestSuccess(
|
||||||
mockTAType("kotlinx.cinterop.CArrayPointer") { mockClassType("kotlinx.cinterop.CPointer") },
|
expected = mockTAType("kotlinx.cinterop.CArrayPointer") { mockClassType("kotlinx.cinterop.CPointer") },
|
||||||
mockTAType("kotlinx.cinterop.CArrayPointer") { mockClassType("kotlinx.cinterop.CPointer") },
|
mockTAType("kotlinx.cinterop.CArrayPointer") { mockClassType("kotlinx.cinterop.CPointer") },
|
||||||
mockTAType("kotlinx.cinterop.CArrayPointer") { mockClassType("kotlinx.cinterop.CPointer") },
|
mockTAType("kotlinx.cinterop.CArrayPointer") { mockClassType("kotlinx.cinterop.CPointer") },
|
||||||
mockTAType("kotlinx.cinterop.CArrayPointer") { mockClassType("kotlinx.cinterop.CPointer") }
|
mockTAType("kotlinx.cinterop.CArrayPointer") { mockClassType("kotlinx.cinterop.CPointer") }
|
||||||
@@ -225,7 +225,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
@Test
|
@Test
|
||||||
fun multilevelTATypesInKotlinPackageWithSameNameAndRightHandSideClass() = doTestSuccess(
|
fun multilevelTATypesInKotlinPackageWithSameNameAndRightHandSideClass() = doTestSuccess(
|
||||||
// that's OK as long as the fully expanded right-hand side is the same class
|
// that's OK as long as the fully expanded right-hand side is the same class
|
||||||
mockTAType("kotlin.FictitiousTypeAlias") {
|
expected = mockTAType("kotlin.FictitiousTypeAlias") {
|
||||||
mockClassType("kotlin.FictitiousClass")
|
mockClassType("kotlin.FictitiousClass")
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -250,7 +250,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun taTypesInUserPackageWithSameNameAndClass() = doTestSuccess(
|
fun taTypesInUserPackageWithSameNameAndClass() = doTestSuccess(
|
||||||
mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") },
|
expected = mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") },
|
||||||
mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") },
|
mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") },
|
||||||
mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") },
|
mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") },
|
||||||
mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") }
|
mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") }
|
||||||
@@ -286,7 +286,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun taTypesInKotlinPackageWithSameNullability1() = doTestSuccess(
|
fun taTypesInKotlinPackageWithSameNullability1() = doTestSuccess(
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
expected = mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder", nullable = false) { mockClassType("kotlin.sequences.SequenceScope") },
|
mockTAType("kotlin.sequences.SequenceBuilder", nullable = false) { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder", nullable = false) { mockClassType("kotlin.sequences.SequenceScope") },
|
mockTAType("kotlin.sequences.SequenceBuilder", nullable = false) { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder", nullable = false) { mockClassType("kotlin.sequences.SequenceScope") }
|
mockTAType("kotlin.sequences.SequenceBuilder", nullable = false) { mockClassType("kotlin.sequences.SequenceScope") }
|
||||||
@@ -294,7 +294,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun taTypesInKotlinPackageWithSameNullability2() = doTestSuccess(
|
fun taTypesInKotlinPackageWithSameNullability2() = doTestSuccess(
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder", nullable = true) { mockClassType("kotlin.sequences.SequenceScope") },
|
expected = mockTAType("kotlin.sequences.SequenceBuilder", nullable = true) { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder", nullable = true) { mockClassType("kotlin.sequences.SequenceScope") },
|
mockTAType("kotlin.sequences.SequenceBuilder", nullable = true) { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder", nullable = true) { mockClassType("kotlin.sequences.SequenceScope") },
|
mockTAType("kotlin.sequences.SequenceBuilder", nullable = true) { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder", nullable = true) { mockClassType("kotlin.sequences.SequenceScope") }
|
mockTAType("kotlin.sequences.SequenceBuilder", nullable = true) { mockClassType("kotlin.sequences.SequenceScope") }
|
||||||
@@ -316,7 +316,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun taTypesInKotlinPackageWithDifferentNullability3() = doTestSuccess(
|
fun taTypesInKotlinPackageWithDifferentNullability3() = doTestSuccess(
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
expected = mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = false) },
|
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = false) },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = false) },
|
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = false) },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = true) }
|
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = true) }
|
||||||
@@ -324,7 +324,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun taTypesInKotlinPackageWithDifferentNullability4() = doTestSuccess(
|
fun taTypesInKotlinPackageWithDifferentNullability4() = doTestSuccess(
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
expected = mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope") },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = true) },
|
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = true) },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = true) },
|
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = true) },
|
||||||
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = false) }
|
mockTAType("kotlin.sequences.SequenceBuilder") { mockClassType("kotlin.sequences.SequenceScope", nullable = false) }
|
||||||
@@ -332,7 +332,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun taTypesInUserPackageWithSameNullability1() = doTestSuccess(
|
fun taTypesInUserPackageWithSameNullability1() = doTestSuccess(
|
||||||
mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") },
|
expected = mockTAType("org.sample.FooAlias") { mockClassType("org.sample.Foo") },
|
||||||
mockTAType("org.sample.FooAlias", nullable = false) { mockClassType("org.sample.Foo") },
|
mockTAType("org.sample.FooAlias", nullable = false) { mockClassType("org.sample.Foo") },
|
||||||
mockTAType("org.sample.FooAlias", nullable = false) { mockClassType("org.sample.Foo") },
|
mockTAType("org.sample.FooAlias", nullable = false) { mockClassType("org.sample.Foo") },
|
||||||
mockTAType("org.sample.FooAlias", nullable = false) { mockClassType("org.sample.Foo") }
|
mockTAType("org.sample.FooAlias", nullable = false) { mockClassType("org.sample.Foo") }
|
||||||
@@ -340,7 +340,7 @@ class TypeCommonizerTest : AbstractCommonizerTest<CirType, CirType>() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun taTypesInUserPackageWithSameNullability2() = doTestSuccess(
|
fun taTypesInUserPackageWithSameNullability2() = doTestSuccess(
|
||||||
mockTAType("org.sample.FooAlias", nullable = true) { mockClassType("org.sample.Foo") },
|
expected = mockTAType("org.sample.FooAlias", nullable = true) { mockClassType("org.sample.Foo") },
|
||||||
mockTAType("org.sample.FooAlias", nullable = true) { mockClassType("org.sample.Foo") },
|
mockTAType("org.sample.FooAlias", nullable = true) { mockClassType("org.sample.Foo") },
|
||||||
mockTAType("org.sample.FooAlias", nullable = true) { mockClassType("org.sample.Foo") },
|
mockTAType("org.sample.FooAlias", nullable = true) { mockClassType("org.sample.Foo") },
|
||||||
mockTAType("org.sample.FooAlias", nullable = true) { mockClassType("org.sample.Foo") }
|
mockTAType("org.sample.FooAlias", nullable = true) { mockClassType("org.sample.Foo") }
|
||||||
|
|||||||
+2
-2
@@ -19,7 +19,7 @@ class TypeParameterCommonizerTest : AbstractCommonizerTest<CirTypeParameter, Cir
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allAreReified() = doTestSuccess(
|
fun allAreReified() = doTestSuccess(
|
||||||
mockTypeParam(isReified = true),
|
expected = mockTypeParam(isReified = true),
|
||||||
mockTypeParam(isReified = true),
|
mockTypeParam(isReified = true),
|
||||||
mockTypeParam(isReified = true),
|
mockTypeParam(isReified = true),
|
||||||
mockTypeParam(isReified = true)
|
mockTypeParam(isReified = true)
|
||||||
@@ -27,7 +27,7 @@ class TypeParameterCommonizerTest : AbstractCommonizerTest<CirTypeParameter, Cir
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allAreNotReified() = doTestSuccess(
|
fun allAreNotReified() = doTestSuccess(
|
||||||
mockTypeParam(isReified = false),
|
expected = mockTypeParam(isReified = false),
|
||||||
mockTypeParam(isReified = false),
|
mockTypeParam(isReified = false),
|
||||||
mockTypeParam(isReified = false),
|
mockTypeParam(isReified = false),
|
||||||
mockTypeParam(isReified = false)
|
mockTypeParam(isReified = false)
|
||||||
|
|||||||
+2
-2
@@ -13,7 +13,7 @@ class TypeParameterListCommonizerTest : AbstractCommonizerTest<List<CirTypeParam
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun emptyValueParameters() = doTestSuccess(
|
fun emptyValueParameters() = doTestSuccess(
|
||||||
emptyList(),
|
expected = emptyList(),
|
||||||
emptyList(),
|
emptyList(),
|
||||||
emptyList(),
|
emptyList(),
|
||||||
emptyList()
|
emptyList()
|
||||||
@@ -21,7 +21,7 @@ class TypeParameterListCommonizerTest : AbstractCommonizerTest<List<CirTypeParam
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun matchedParameters() = doTestSuccess(
|
fun matchedParameters() = doTestSuccess(
|
||||||
mockTypeParams(
|
expected = mockTypeParams(
|
||||||
"T" to "kotlin.Any?",
|
"T" to "kotlin.Any?",
|
||||||
"R" to "kotlin.CharSequence",
|
"R" to "kotlin.CharSequence",
|
||||||
"Q" to "org.sample.Foo?"
|
"Q" to "org.sample.Foo?"
|
||||||
|
|||||||
+10
-10
@@ -19,7 +19,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun sameReturnType1() = doTestSuccess(
|
fun sameReturnType1() = doTestSuccess(
|
||||||
mockValueParam("kotlin.String"),
|
expected = mockValueParam("kotlin.String"),
|
||||||
mockValueParam("kotlin.String"),
|
mockValueParam("kotlin.String"),
|
||||||
mockValueParam("kotlin.String"),
|
mockValueParam("kotlin.String"),
|
||||||
mockValueParam("kotlin.String")
|
mockValueParam("kotlin.String")
|
||||||
@@ -27,7 +27,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun sameReturnType2() = doTestSuccess(
|
fun sameReturnType2() = doTestSuccess(
|
||||||
mockValueParam("org.sample.Foo"),
|
expected = mockValueParam("org.sample.Foo"),
|
||||||
mockValueParam("org.sample.Foo"),
|
mockValueParam("org.sample.Foo"),
|
||||||
mockValueParam("org.sample.Foo"),
|
mockValueParam("org.sample.Foo"),
|
||||||
mockValueParam("org.sample.Foo")
|
mockValueParam("org.sample.Foo")
|
||||||
@@ -56,7 +56,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allHaveVararg1() = doTestSuccess(
|
fun allHaveVararg1() = doTestSuccess(
|
||||||
mockValueParam("kotlin.String", hasVarargElementType = true),
|
expected = mockValueParam("kotlin.String", hasVarargElementType = true),
|
||||||
mockValueParam("kotlin.String", hasVarargElementType = true),
|
mockValueParam("kotlin.String", hasVarargElementType = true),
|
||||||
mockValueParam("kotlin.String", hasVarargElementType = true),
|
mockValueParam("kotlin.String", hasVarargElementType = true),
|
||||||
mockValueParam("kotlin.String", hasVarargElementType = true)
|
mockValueParam("kotlin.String", hasVarargElementType = true)
|
||||||
@@ -64,7 +64,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allHaveVararg2() = doTestSuccess(
|
fun allHaveVararg2() = doTestSuccess(
|
||||||
mockValueParam("org.sample.Foo", hasVarargElementType = true),
|
expected = mockValueParam("org.sample.Foo", hasVarargElementType = true),
|
||||||
mockValueParam("org.sample.Foo", hasVarargElementType = true),
|
mockValueParam("org.sample.Foo", hasVarargElementType = true),
|
||||||
mockValueParam("org.sample.Foo", hasVarargElementType = true),
|
mockValueParam("org.sample.Foo", hasVarargElementType = true),
|
||||||
mockValueParam("org.sample.Foo", hasVarargElementType = true)
|
mockValueParam("org.sample.Foo", hasVarargElementType = true)
|
||||||
@@ -86,7 +86,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allHaveCrossinline() = doTestSuccess(
|
fun allHaveCrossinline() = doTestSuccess(
|
||||||
mockValueParam("kotlin.String", isCrossinline = true),
|
expected = mockValueParam("kotlin.String", isCrossinline = true),
|
||||||
mockValueParam("kotlin.String", isCrossinline = true),
|
mockValueParam("kotlin.String", isCrossinline = true),
|
||||||
mockValueParam("kotlin.String", isCrossinline = true),
|
mockValueParam("kotlin.String", isCrossinline = true),
|
||||||
mockValueParam("kotlin.String", isCrossinline = true)
|
mockValueParam("kotlin.String", isCrossinline = true)
|
||||||
@@ -94,7 +94,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun someHaveCrossinline1() = doTestSuccess(
|
fun someHaveCrossinline1() = doTestSuccess(
|
||||||
mockValueParam("kotlin.String", isCrossinline = false),
|
expected = mockValueParam("kotlin.String", isCrossinline = false),
|
||||||
mockValueParam("kotlin.String", isCrossinline = true),
|
mockValueParam("kotlin.String", isCrossinline = true),
|
||||||
mockValueParam("kotlin.String", isCrossinline = true),
|
mockValueParam("kotlin.String", isCrossinline = true),
|
||||||
mockValueParam("kotlin.String", isCrossinline = false)
|
mockValueParam("kotlin.String", isCrossinline = false)
|
||||||
@@ -102,7 +102,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun someHaveCrossinline2() = doTestSuccess(
|
fun someHaveCrossinline2() = doTestSuccess(
|
||||||
mockValueParam("kotlin.String", isCrossinline = false),
|
expected = mockValueParam("kotlin.String", isCrossinline = false),
|
||||||
mockValueParam("kotlin.String", isCrossinline = false),
|
mockValueParam("kotlin.String", isCrossinline = false),
|
||||||
mockValueParam("kotlin.String", isCrossinline = true),
|
mockValueParam("kotlin.String", isCrossinline = true),
|
||||||
mockValueParam("kotlin.String", isCrossinline = true)
|
mockValueParam("kotlin.String", isCrossinline = true)
|
||||||
@@ -110,7 +110,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun allHaveNoinline() = doTestSuccess(
|
fun allHaveNoinline() = doTestSuccess(
|
||||||
mockValueParam("kotlin.String", isNoinline = true),
|
expected = mockValueParam("kotlin.String", isNoinline = true),
|
||||||
mockValueParam("kotlin.String", isNoinline = true),
|
mockValueParam("kotlin.String", isNoinline = true),
|
||||||
mockValueParam("kotlin.String", isNoinline = true),
|
mockValueParam("kotlin.String", isNoinline = true),
|
||||||
mockValueParam("kotlin.String", isNoinline = true)
|
mockValueParam("kotlin.String", isNoinline = true)
|
||||||
@@ -118,7 +118,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun someHaveNoinline1() = doTestSuccess(
|
fun someHaveNoinline1() = doTestSuccess(
|
||||||
mockValueParam("kotlin.String", isNoinline = false),
|
expected = mockValueParam("kotlin.String", isNoinline = false),
|
||||||
mockValueParam("kotlin.String", isNoinline = true),
|
mockValueParam("kotlin.String", isNoinline = true),
|
||||||
mockValueParam("kotlin.String", isNoinline = true),
|
mockValueParam("kotlin.String", isNoinline = true),
|
||||||
mockValueParam("kotlin.String", isNoinline = false)
|
mockValueParam("kotlin.String", isNoinline = false)
|
||||||
@@ -126,7 +126,7 @@ class ValueParameterCommonizerTest : AbstractCommonizerTest<CirValueParameter, C
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun someHaveNoinline2() = doTestSuccess(
|
fun someHaveNoinline2() = doTestSuccess(
|
||||||
mockValueParam("kotlin.String", isNoinline = false),
|
expected = mockValueParam("kotlin.String", isNoinline = false),
|
||||||
mockValueParam("kotlin.String", isNoinline = false),
|
mockValueParam("kotlin.String", isNoinline = false),
|
||||||
mockValueParam("kotlin.String", isNoinline = true),
|
mockValueParam("kotlin.String", isNoinline = true),
|
||||||
mockValueParam("kotlin.String", isNoinline = true)
|
mockValueParam("kotlin.String", isNoinline = true)
|
||||||
|
|||||||
+2
-2
@@ -14,7 +14,7 @@ class ValueParameterListCommonizerTest : AbstractCommonizerTest<List<CirValuePar
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun emptyValueParameters() = doTestSuccess(
|
fun emptyValueParameters() = doTestSuccess(
|
||||||
emptyList(),
|
expected = emptyList(),
|
||||||
emptyList(),
|
emptyList(),
|
||||||
emptyList(),
|
emptyList(),
|
||||||
emptyList()
|
emptyList()
|
||||||
@@ -22,7 +22,7 @@ class ValueParameterListCommonizerTest : AbstractCommonizerTest<List<CirValuePar
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun matchedParameters() = doTestSuccess(
|
fun matchedParameters() = doTestSuccess(
|
||||||
mockValueParams(
|
expected = mockValueParams(
|
||||||
"a" to "kotlin.String",
|
"a" to "kotlin.String",
|
||||||
"b" to "kotlin.Int",
|
"b" to "kotlin.Int",
|
||||||
"c" to "org.sample.Foo"
|
"c" to "org.sample.Foo"
|
||||||
|
|||||||
Reference in New Issue
Block a user