Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#163 reproducer #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/test/kotlin/cases/marker/HiddenByJavaAnnotation.java
@@ -0,0 +1,8 @@
package cases.marker;

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

@Target(ElementType.TYPE)
public @interface HiddenByJavaAnnotation {
}
5 changes: 5 additions & 0 deletions src/test/kotlin/cases/marker/javaFileAnnotation.kt
@@ -0,0 +1,5 @@
@file:HiddenByJavaAnnotation

package cases.marker

class ClassInAFileAnnotatedByHiddenJava
5 changes: 5 additions & 0 deletions src/test/kotlin/cases/marker/ktFileAnnotation.kt
@@ -0,0 +1,5 @@
@file:HiddenByKtAnnotation

package cases.marker

class ClassInAFileAnnotatedByHiddenKt
3 changes: 3 additions & 0 deletions src/test/kotlin/cases/marker/marker.kt
Expand Up @@ -8,6 +8,9 @@ annotation class HiddenProperty

annotation class HiddenMethod

@Target(AnnotationTarget.FILE)
annotation class HiddenByKtAnnotation

public class Foo {
// HiddenField will be on the field
@HiddenField
Expand Down
6 changes: 6 additions & 0 deletions src/test/kotlin/cases/marker/marker.txt
Expand Up @@ -2,6 +2,12 @@ public final class cases/marker/Foo {
public fun <init> ()V
}

public abstract interface annotation class cases/marker/HiddenByJavaAnnotation : java/lang/annotation/Annotation {
}

public abstract interface annotation class cases/marker/HiddenByKtAnnotation : java/lang/annotation/Annotation {
}

public abstract interface annotation class cases/marker/HiddenField : java/lang/annotation/Annotation {
}

Expand Down
13 changes: 12 additions & 1 deletion src/test/kotlin/tests/CasesPublicAPITest.kt
Expand Up @@ -41,7 +41,18 @@ class CasesPublicAPITest {

@Test fun localClasses() { snapshotAPIAndCompare(testName.methodName) }

@Test fun marker() { snapshotAPIAndCompare(testName.methodName, setOf("cases/marker/HiddenField", "cases/marker/HiddenProperty", "cases/marker/HiddenMethod")) }
@Test
fun marker() {
snapshotAPIAndCompare(
testName.methodName, setOf(
"cases/marker/HiddenField",
"cases/marker/HiddenProperty",
"cases/marker/HiddenMethod",
"cases/marker/HiddenByJavaAnnotation",
"cases/marker/HiddenByKtAnnotation",
)
)
}

@Test fun nestedClasses() { snapshotAPIAndCompare(testName.methodName) }

Expand Down