[kotlin] KTIJ-24485 Add tests for "redundant visibility modifier" inspection in explicit API mode

GitOrigin-RevId: 264ca542d6dec38512a77ee9da40ab449f661869
This commit is contained in:
Marco Pennekamp
2023-02-15 20:51:19 +00:00
committed by intellij-monorepo-bot
parent e2e5d6c0d1
commit ea5d5e7efc
10 changed files with 104 additions and 0 deletions
@@ -113,6 +113,36 @@ public abstract class K2LocalInspectionTestGenerated extends AbstractK2LocalInsp
runTest("../../../idea/tests/testData/inspectionsLocal/redundantVisibilityModifier/protectedIsDefaultForSealedConstructor.kt");
}
@TestMetadata("publicExplicitApiModeStrict.kt")
public void testPublicExplicitApiModeStrict() throws Exception {
runTest("../../../idea/tests/testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeStrict.kt");
}
@TestMetadata("publicExplicitApiModeStrict2.kt")
public void testPublicExplicitApiModeStrict2() throws Exception {
runTest("../../../idea/tests/testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeStrict2.kt");
}
@TestMetadata("publicExplicitApiModeStrict3.kt")
public void testPublicExplicitApiModeStrict3() throws Exception {
runTest("../../../idea/tests/testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeStrict3.kt");
}
@TestMetadata("publicExplicitApiModeWarning.kt")
public void testPublicExplicitApiModeWarning() throws Exception {
runTest("../../../idea/tests/testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeWarning.kt");
}
@TestMetadata("publicExplicitApiModeWarning2.kt")
public void testPublicExplicitApiModeWarning2() throws Exception {
runTest("../../../idea/tests/testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeWarning2.kt");
}
@TestMetadata("publicExplicitApiModeWarning3.kt")
public void testPublicExplicitApiModeWarning3() throws Exception {
runTest("../../../idea/tests/testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeWarning3.kt");
}
@TestMetadata("publicOverrideProtectedSetter.kt")
public void testPublicOverrideProtectedSetter() throws Exception {
runTest("../../../idea/tests/testData/inspectionsLocal/redundantVisibilityModifier/publicOverrideProtectedSetter.kt");
@@ -10562,6 +10562,36 @@ public abstract class LocalInspectionTestGenerated extends AbstractLocalInspecti
runTest("testData/inspectionsLocal/redundantVisibilityModifier/protectedIsDefaultForSealedConstructor.kt");
}
@TestMetadata("publicExplicitApiModeStrict.kt")
public void testPublicExplicitApiModeStrict() throws Exception {
runTest("testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeStrict.kt");
}
@TestMetadata("publicExplicitApiModeStrict2.kt")
public void testPublicExplicitApiModeStrict2() throws Exception {
runTest("testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeStrict2.kt");
}
@TestMetadata("publicExplicitApiModeStrict3.kt")
public void testPublicExplicitApiModeStrict3() throws Exception {
runTest("testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeStrict3.kt");
}
@TestMetadata("publicExplicitApiModeWarning.kt")
public void testPublicExplicitApiModeWarning() throws Exception {
runTest("testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeWarning.kt");
}
@TestMetadata("publicExplicitApiModeWarning2.kt")
public void testPublicExplicitApiModeWarning2() throws Exception {
runTest("testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeWarning2.kt");
}
@TestMetadata("publicExplicitApiModeWarning3.kt")
public void testPublicExplicitApiModeWarning3() throws Exception {
runTest("testData/inspectionsLocal/redundantVisibilityModifier/publicExplicitApiModeWarning3.kt");
}
@TestMetadata("publicOverrideProtectedSetter.kt")
public void testPublicOverrideProtectedSetter() throws Exception {
runTest("testData/inspectionsLocal/redundantVisibilityModifier/publicOverrideProtectedSetter.kt");
@@ -0,0 +1,6 @@
// PROBLEM: none
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
<caret>public abstract class A {
public abstract fun test()
}
@@ -0,0 +1,6 @@
// PROBLEM: none
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
public abstract class A {
<caret>public abstract fun test()
}
@@ -0,0 +1,5 @@
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
private abstract class A {
<caret>public abstract fun test()
}
@@ -0,0 +1,5 @@
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
private abstract class A {
abstract fun test()
}
@@ -0,0 +1,6 @@
// PROBLEM: none
// COMPILER_ARGUMENTS: -Xexplicit-api=warning
<caret>public abstract class A {
public abstract fun test()
}
@@ -0,0 +1,6 @@
// PROBLEM: none
// COMPILER_ARGUMENTS: -Xexplicit-api=warning
public abstract class A {
<caret>public abstract fun test()
}
@@ -0,0 +1,5 @@
// COMPILER_ARGUMENTS: -Xexplicit-api=warning
private abstract class A {
<caret>public abstract fun test()
}
@@ -0,0 +1,5 @@
// COMPILER_ARGUMENTS: -Xexplicit-api=warning
private abstract class A {
abstract fun test()
}