diff --git a/jvm/jvm-analysis-kotlin-tests-shared/testSrc/com/intellij/codeInspection/tests/kotlin/test/KotlinAssertEqualsBetweenInconvertibleTypesInspectionTest.kt b/jvm/jvm-analysis-kotlin-tests-shared/testSrc/com/intellij/codeInspection/tests/kotlin/test/KotlinAssertEqualsBetweenInconvertibleTypesInspectionTest.kt
index 142a6d0363df..36bba29222a0 100644
--- a/jvm/jvm-analysis-kotlin-tests-shared/testSrc/com/intellij/codeInspection/tests/kotlin/test/KotlinAssertEqualsBetweenInconvertibleTypesInspectionTest.kt
+++ b/jvm/jvm-analysis-kotlin-tests-shared/testSrc/com/intellij/codeInspection/tests/kotlin/test/KotlinAssertEqualsBetweenInconvertibleTypesInspectionTest.kt
@@ -19,7 +19,7 @@ abstract class KotlinAssertEqualsBetweenInconvertibleTypesInspectionTest : Asser
}
@Test
- fun `test JUnit 4 assertEquals`() {
+ fun `JUnit 4 assertEquals`() {
@Language("kotlin") val code = """
import org.junit.Test
import kotlin.test.assertEquals
@@ -118,7 +118,8 @@ abstract class KotlinAssertEqualsBetweenInconvertibleTypesInspectionTest : Asser
myFixture.testHighlighting(JvmLanguage.KOTLIN, code)
}
- fun `test JUnit 5 assertNotEquals`() {
+ @Test
+ fun `JUnit 5 assertNotEquals`() {
@Language("kotlin") val code = """
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.Assertions.assertNotEquals
@@ -135,7 +136,8 @@ abstract class KotlinAssertEqualsBetweenInconvertibleTypesInspectionTest : Asser
myFixture.testHighlighting(JvmLanguage.KOTLIN, code)
}
- fun `test AssertJ assertNotEquals`() {
+ @Test
+ fun `AssertJ assertNotEquals`() {
@Language("kotlin") val code = """
import org.junit.jupiter.api.Test
import org.assertj.core.api.Assertions
@@ -152,7 +154,8 @@ abstract class KotlinAssertEqualsBetweenInconvertibleTypesInspectionTest : Asser
myFixture.testHighlighting(JvmLanguage.KOTLIN, code)
}
- fun `test JUnit 4 assertNotSame`() {
+ @Test
+ fun `JUnit 4 assertNotSame`() {
@Language("kotlin") val code = """
import org.junit.Test
import org.junit.Assert.assertNotSame
@@ -1021,4 +1024,48 @@ abstract class KotlinAssertEqualsBetweenInconvertibleTypesInspectionTest : Asser
myFixture.testHighlighting(JvmLanguage.KOTLIN, code)
}
+
+ @Test
+ fun `Kotlin typealias`() {
+ @Language("kotlin") val code = """
+ import org.junit.Test
+ import org.junit.Assert
+
+ typealias TypeAlias = Int
+
+ class MySampleTest {
+ @Test
+ fun myTest() {
+ val expected: TypeAlias = 3
+ Assert.assertEquals(expected, 3)
+ Assert.assertEquals(expected, "foo")
+ }
+ }
+ """.trimIndent()
+
+ myFixture.testHighlighting(JvmLanguage.KOTLIN, code)
+ }
+
+ @Ignore("We are aware of this edge case, but it seems not possible to fix with the current UAST API. See IDEA-362694")
+ @Test
+ fun `Kotlin inline value class`() {
+ @Language("kotlin") val code = """
+ import org.junit.Test
+ import org.junit.Assert
+
+ @JvmInline
+ value class ValueClass(val prop: String)
+
+ class MySampleTest {
+ @Test
+ fun myTest() {
+ Assert.assertEquals(ValueClass("foo"), 1)
+ Assert.assertEquals(ValueClass("foo"), "foo")
+ Assert.assertEquals(ValueClass("foo"), ValueClass("foo"))
+ }
+ }
+ """.trimIndent()
+
+ myFixture.testHighlighting(JvmLanguage.KOTLIN, code)
+ }
}