Change Signature: Update test data
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
Parameter s is used in method body
|
||||
Parameter s is used in method body
|
||||
+7
-3
@@ -125,9 +125,9 @@ class KotlinChangeSignatureTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
compareEditorsWithExpectedData()
|
||||
}
|
||||
|
||||
private fun doTestConflict(configure: KotlinChangeInfo.() -> Unit = {}) {
|
||||
private fun runAndCheckConflicts(testAction: () -> Unit) {
|
||||
try {
|
||||
doTest(configure)
|
||||
testAction()
|
||||
TestCase.fail("No conflicts found")
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
@@ -142,6 +142,8 @@ class KotlinChangeSignatureTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun doTestConflict(configure: KotlinChangeInfo.() -> Unit = {}) = runAndCheckConflicts { doTest(configure) }
|
||||
|
||||
private fun doTestUnmodifiable(configure: KotlinChangeInfo.() -> Unit = {}) {
|
||||
try {
|
||||
doTest(configure)
|
||||
@@ -217,6 +219,8 @@ class KotlinChangeSignatureTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
compareEditorsWithExpectedData()
|
||||
}
|
||||
|
||||
private fun doJavaTestConflict(configure: JavaRefactoringConfiguration.() -> Unit) = runAndCheckConflicts { doJavaTest(configure) }
|
||||
|
||||
private fun compareEditorsWithExpectedData() {
|
||||
//noinspection ConstantConditions
|
||||
val checkErrorsAfter = InTextDirectivesUtils.isDirectiveDefined(file!!.text, "// CHECK_ERRORS_AFTER")
|
||||
@@ -671,7 +675,7 @@ class KotlinChangeSignatureTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
|
||||
fun testParameterToReceiverImplicitReceivers() = doTest { receiverParameterInfo = newParameters[0] }
|
||||
|
||||
fun testJavaMethodOverridesReplaceParam() = doJavaTest {
|
||||
fun testJavaMethodOverridesReplaceParam() = doJavaTestConflict {
|
||||
newReturnType = stringPsiType
|
||||
newParameters[0] = ParameterInfoImpl(-1, "x", PsiType.INT, "1")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user