ReplaceGuardClause inspection: don't report when argument is not String

This commit is contained in:
Toshiaki Kameyama
2019-06-10 18:46:59 +09:00
committed by Mikhail Glukhikh
parent 90b0ea73dc
commit 8cbcb66197
3 changed files with 22 additions and 2 deletions
@@ -8914,6 +8914,11 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/replaceGuardClauseWithFunctionCall"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true);
}
@TestMetadata("notStringArgument.kt")
public void testNotStringArgument() throws Exception {
runTest("idea/testData/inspectionsLocal/replaceGuardClauseWithFunctionCall/notStringArgument.kt");
}
@TestMetadata("notTargetException.kt")
public void testNotTargetException() throws Exception {
runTest("idea/testData/inspectionsLocal/replaceGuardClauseWithFunctionCall/notTargetException.kt");