Reporting USELESS_ELVIS and UNNECESSARY_NOT_NULL_ASSERTION on Java's @NotNull values

This commit is contained in:
Andrey Breslav
2015-02-05 17:39:36 +03:00
parent 30f5c1b953
commit f36d6ce5b2
11 changed files with 257 additions and 5 deletions
@@ -8598,6 +8598,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("elvis.kt")
public void testElvis() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.kt");
doTest(fileName);
}
@TestMetadata("expectedType.kt")
public void testExpectedType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/expectedType.kt");
@@ -8628,6 +8634,18 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("notNullAssertion.kt")
public void testNotNullAssertion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertion.kt");
doTest(fileName);
}
@TestMetadata("notNullAssertionInCall.kt")
public void testNotNullAssertionInCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertionInCall.kt");
doTest(fileName);
}
@TestMetadata("passToJava.kt")
public void testPassToJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.kt");
@@ -8651,6 +8669,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/throw.kt");
doTest(fileName);
}
@TestMetadata("uselessElvisInCall.kt")
public void testUselessElvisInCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/uselessElvisInCall.kt");
doTest(fileName);
}
}
}