Skip to content

Commit 5826452

Browse files
committed
Added a test reproducing the issue from #234 (p. 1 & 2)
1 parent 36b5785 commit 5826452

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/functionalTest/kotlin/kotlinx/validation/test/KlibVerificationTests.kt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,4 +752,26 @@ internal class KlibVerificationTests : BaseKotlinGradleTest() {
752752
assertTaskFailure(":klibApiCheck")
753753
}
754754
}
755+
756+
@Test
757+
fun `apiCheck should fail after target removal`() {
758+
val runner = test {
759+
settingsGradleKts {
760+
resolve("/examples/gradle/settings/settings-name-testproject.gradle.kts")
761+
}
762+
// only a single native target is defined there
763+
buildGradleKts {
764+
resolve("/examples/gradle/base/withNativePluginAndSingleTarget.gradle.kts")
765+
}
766+
addToSrcSet("/examples/classes/AnotherBuildConfig.kt")
767+
// dump was created for multiple native targets
768+
abiFile(projectName = "testproject") {
769+
resolve("/examples/classes/AnotherBuildConfig.klib.dump")
770+
}
771+
runApiCheck()
772+
}
773+
runner.buildAndFail().apply {
774+
assertTaskFailure(":klibApiCheck")
775+
}
776+
}
755777
}

0 commit comments

Comments
 (0)