[test] Remove redundant signature clash diagnotic test from Native tests
Since d8d8f24f62 the tests for this
diagnostic are run with the Compiler Core test infrastructure
(see `compiler/testData/diagnostics/klibSerializationTests`)
There is no need to test it separately in `FirCompilerOutputTest`.
^KT-64393 Fixed
This commit is contained in:
committed by
Space Team
parent
8c320f0602
commit
67afd12f94
@@ -1,3 +0,0 @@
|
||||
package com.example.klib.serialization.diagnostics
|
||||
|
||||
fun movedToLib() {}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.example.klib.serialization.diagnostics
|
||||
|
||||
class A {
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
fun foo(): String = ""
|
||||
|
||||
fun foo(): Int = 0
|
||||
}
|
||||
|
||||
var myVal: Long = 0L
|
||||
|
||||
@Deprecated("This function moved to the 'lib' module", level = DeprecationLevel.HIDDEN)
|
||||
fun movedToLib() {}
|
||||
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
var myVal: Int = 0
|
||||
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
val myVal: String
|
||||
get() = ""
|
||||
|
||||
fun main() {
|
||||
println(A().foo())
|
||||
movedToLib()
|
||||
}
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:4:5: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/A.foo|foo(){}[0]):
|
||||
fun foo(): kotlin.String defined in com.example.klib.serialization.diagnostics.A
|
||||
fun foo(): kotlin.Int defined in com.example.klib.serialization.diagnostics.A
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:7:5: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/A.foo|foo(){}[0]):
|
||||
fun foo(): kotlin.String defined in com.example.klib.serialization.diagnostics.A
|
||||
fun foo(): kotlin.Int defined in com.example.klib.serialization.diagnostics.A
|
||||
fun foo(): Int = 0
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:10:1: error: platform declaration clash: The following properties have the same IR signature (com.example.klib.serialization.diagnostics/myVal|{}myVal[0]):
|
||||
val myVal: kotlin.String defined in com.example.klib.serialization.diagnostics
|
||||
var myVal: kotlin.Int defined in com.example.klib.serialization.diagnostics
|
||||
var myVal: kotlin.Long defined in com.example.klib.serialization.diagnostics
|
||||
var myVal: Long = 0L
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:10:1: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/myVal.<get-myVal>|<get-myVal>(){}[0]):
|
||||
fun `<get-myVal>`(): kotlin.Int defined in com.example.klib.serialization.diagnostics
|
||||
fun `<get-myVal>`(): kotlin.Long defined in com.example.klib.serialization.diagnostics
|
||||
fun `<get-myVal>`(): kotlin.String defined in com.example.klib.serialization.diagnostics
|
||||
var myVal: Long = 0L
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:15:1: error: platform declaration clash: The following properties have the same IR signature (com.example.klib.serialization.diagnostics/myVal|{}myVal[0]):
|
||||
val myVal: kotlin.String defined in com.example.klib.serialization.diagnostics
|
||||
var myVal: kotlin.Int defined in com.example.klib.serialization.diagnostics
|
||||
var myVal: kotlin.Long defined in com.example.klib.serialization.diagnostics
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:15:1: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/myVal.<get-myVal>|<get-myVal>(){}[0]):
|
||||
fun `<get-myVal>`(): kotlin.Int defined in com.example.klib.serialization.diagnostics
|
||||
fun `<get-myVal>`(): kotlin.Long defined in com.example.klib.serialization.diagnostics
|
||||
fun `<get-myVal>`(): kotlin.String defined in com.example.klib.serialization.diagnostics
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:18:1: error: platform declaration clash: The following properties have the same IR signature (com.example.klib.serialization.diagnostics/myVal|{}myVal[0]):
|
||||
val myVal: kotlin.String defined in com.example.klib.serialization.diagnostics
|
||||
var myVal: kotlin.Int defined in com.example.klib.serialization.diagnostics
|
||||
var myVal: kotlin.Long defined in com.example.klib.serialization.diagnostics
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
native/native.tests/testData/compilerOutput/SignatureClashDiagnostics/main.kt:20:5: error: platform declaration clash: The following functions have the same IR signature (com.example.klib.serialization.diagnostics/myVal.<get-myVal>|<get-myVal>(){}[0]):
|
||||
fun `<get-myVal>`(): kotlin.Int defined in com.example.klib.serialization.diagnostics
|
||||
fun `<get-myVal>`(): kotlin.Long defined in com.example.klib.serialization.diagnostics
|
||||
fun `<get-myVal>`(): kotlin.String defined in com.example.klib.serialization.diagnostics
|
||||
get() = ""
|
||||
^^^^^^^^^^
|
||||
COMPILATION_ERROR
|
||||
+3
-14
@@ -164,25 +164,14 @@ abstract class CompilerOutputTestBase : AbstractNativeSimpleTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("JUnitTestCaseWithNoTests")
|
||||
@TestDataPath("\$PROJECT_ROOT")
|
||||
@EnforcedProperty(ClassLevelProperty.COMPILER_OUTPUT_INTERCEPTOR, "NONE")
|
||||
class ClassicCompilerOutputTest : CompilerOutputTestBase()
|
||||
|
||||
@Suppress("JUnitTestCaseWithNoTests")
|
||||
@FirPipeline
|
||||
@Tag("frontend-fir")
|
||||
@TestDataPath("\$PROJECT_ROOT")
|
||||
@EnforcedProperty(ClassLevelProperty.COMPILER_OUTPUT_INTERCEPTOR, "NONE")
|
||||
class FirCompilerOutputTest : CompilerOutputTestBase() {
|
||||
|
||||
@Test
|
||||
fun testSignatureClashDiagnostics() {
|
||||
// TODO: use the Compiler Core test infrastructure for testing these diagnostics (KT-64393)
|
||||
val rootDir = File("native/native.tests/testData/compilerOutput/SignatureClashDiagnostics")
|
||||
val settings = testRunSettings
|
||||
val lib = compileLibrary(settings, rootDir.resolve("lib.kt")).assertSuccess().resultingArtifact
|
||||
val compilationResult = compileLibrary(settings, rootDir.resolve("main.kt"), dependencies = listOf(lib))
|
||||
val goldenData = rootDir.resolve("output.txt")
|
||||
|
||||
KotlinTestUtils.assertEqualsToFile(goldenData, compilationResult.toOutput())
|
||||
}
|
||||
}
|
||||
class FirCompilerOutputTest : CompilerOutputTestBase()
|
||||
|
||||
Reference in New Issue
Block a user