Skip to content

Commit

Permalink
[TEST] Add enum static tests for Kotlin-to-Java direct actualization
Browse files Browse the repository at this point in the history
Make sure that nothing will break after I fix KT-71817
  • Loading branch information
nikitabobko authored and qodana-bot committed Sep 30, 2024
1 parent a0499ca commit d21f050
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// WITH_KOTLIN_JVM_ANNOTATIONS
// LANGUAGE:+DirectJavaActualization
// MODULE: m1-common
// FILE: common.kt
expect enum class Ok {
ENTRY;
fun values() // Not to be confused with static values
}

expect enum class NoAnnotation {
ENTRY;
fun <!KOTLIN_ACTUAL_ANNOTATION_MISSING{JVM}!>values<!>() // Not to be confused with static values
}

<!JAVA_DIRECT_ACTUAL_WITHOUT_EXPECT{JVM}!>expect<!> enum class ExcessiveAnnotation {
ENTRY;
}

// MODULE: m2-jvm()()(m1-common)
// FILE: Ok.java
@kotlin.annotations.jvm.KotlinActual public enum Ok {
ENTRY;
@kotlin.annotations.jvm.KotlinActual public void values(){} // Not to be confused with static values
}

// FILE: NoAnnotation.java
@kotlin.annotations.jvm.KotlinActual public enum NoAnnotation {
ENTRY;
public void values(){} // Not to be confused with static values
}

// FILE: ExcessiveAnnotation.java
@kotlin.annotations.jvm.KotlinActual public enum ExcessiveAnnotation {
ENTRY;
@kotlin.annotations.jvm.KotlinActual public void values(){} // Not to be confused with static values
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// WITH_KOTLIN_JVM_ANNOTATIONS
// LANGUAGE:+DirectJavaActualization
// MODULE: m1-common
// FILE: common.kt
expect enum class <!IMPLICIT_JVM_ACTUALIZATION{JVM}!>Ok<!> {
ENTRY;
fun values() // Not to be confused with static values
}

expect enum class <!IMPLICIT_JVM_ACTUALIZATION{JVM}!>NoAnnotation<!> {
ENTRY;
fun values() // Not to be confused with static values
}

expect enum class <!IMPLICIT_JVM_ACTUALIZATION{JVM}!>ExcessiveAnnotation<!> {
ENTRY;
}

// MODULE: m2-jvm()()(m1-common)
// FILE: Ok.java
@kotlin.annotations.jvm.KotlinActual public enum Ok {
ENTRY;
@kotlin.annotations.jvm.KotlinActual public void values(){} // Not to be confused with static values
}

// FILE: NoAnnotation.java
@kotlin.annotations.jvm.KotlinActual public enum NoAnnotation {
ENTRY;
public void values(){} // Not to be confused with static values
}

// FILE: ExcessiveAnnotation.java
@kotlin.annotations.jvm.KotlinActual public enum ExcessiveAnnotation {
ENTRY;
@kotlin.annotations.jvm.KotlinActual public void values(){} // Not to be confused with static values
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// WITH_KOTLIN_JVM_ANNOTATIONS
// LANGUAGE:+DirectJavaActualization
// MODULE: m1-common
// FILE: common.kt
expect enum class Ok {
ENTRY;
fun values() // Not to be confused with static values
}

expect enum class NoAnnotation {
ENTRY;
fun values() // Not to be confused with static values
}

expect enum class ExcessiveAnnotation {
ENTRY;
}

// MODULE: m2-jvm()()(m1-common)
// FILE: Ok.java
@kotlin.annotations.jvm.KotlinActual public enum Ok {
ENTRY;
@kotlin.annotations.jvm.KotlinActual public void values(){} // Not to be confused with static values
}

// FILE: NoAnnotation.java
@kotlin.annotations.jvm.KotlinActual public enum NoAnnotation {
ENTRY;
public void values(){} // Not to be confused with static values
}

// FILE: ExcessiveAnnotation.java
@kotlin.annotations.jvm.KotlinActual public enum ExcessiveAnnotation {
ENTRY;
@kotlin.annotations.jvm.KotlinActual public void values(){} // Not to be confused with static values
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d21f050

Please sign in to comment.