Intention to replace a = b with b.also { a = it }
^KT-22420 Fixed
This commit is contained in:
committed by
Vladimir Dolzhenko
parent
e387d56d93
commit
94970e2d1e
@@ -8240,6 +8240,39 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/intentions/convertVariableAssignmentToExpression")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ConvertVariableAssignmentToExpression extends AbstractIntentionTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInConvertVariableAssignmentToExpression() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/intentions/convertVariableAssignmentToExpression"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("complexLhs.kt")
|
||||
public void testComplexLhs() throws Exception {
|
||||
runTest("idea/testData/intentions/convertVariableAssignmentToExpression/complexLhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexRhs.kt")
|
||||
public void testComplexRhs() throws Exception {
|
||||
runTest("idea/testData/intentions/convertVariableAssignmentToExpression/complexRhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAssignment.kt")
|
||||
public void testNoAssignment() throws Exception {
|
||||
runTest("idea/testData/intentions/convertVariableAssignmentToExpression/noAssignment.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("idea/testData/intentions/convertVariableAssignmentToExpression/simple.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user