Inspection: convert initialized val to non-null type

^KT-35757 Fixed
This commit is contained in:
kvirolainen
2020-09-03 16:29:45 +02:00
committed by Vladimir Dolzhenko
parent 8b28e54584
commit 18fbf5729d
13 changed files with 149 additions and 0 deletions
@@ -3480,6 +3480,39 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
}
}
@TestMetadata("idea/testData/inspectionsLocal/convertInitializedValToNonNullType")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ConvertInitializedValToNonNullType extends AbstractLocalInspectionTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInConvertInitializedValToNonNullType() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/inspectionsLocal/convertInitializedValToNonNullType"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), null, true);
}
@TestMetadata("assignToMethodCall.kt")
public void testAssignToMethodCall() throws Exception {
runTest("idea/testData/inspectionsLocal/convertInitializedValToNonNullType/assignToMethodCall.kt");
}
@TestMetadata("assignToVariable.kt")
public void testAssignToVariable() throws Exception {
runTest("idea/testData/inspectionsLocal/convertInitializedValToNonNullType/assignToVariable.kt");
}
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("idea/testData/inspectionsLocal/convertInitializedValToNonNullType/basic.kt");
}
@TestMetadata("negative.kt")
public void testNegative() throws Exception {
runTest("idea/testData/inspectionsLocal/convertInitializedValToNonNullType/negative.kt");
}
}
@TestMetadata("idea/testData/inspectionsLocal/convertNaNEquality")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)