Skip to content

Commit

Permalink
Added a test reproducing the issue from #234 (p. 1 & 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhinkin committed Jun 5, 2024
1 parent 36b5785 commit 5826452
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -752,4 +752,26 @@ internal class KlibVerificationTests : BaseKotlinGradleTest() {
assertTaskFailure(":klibApiCheck")
}
}

@Test
fun `apiCheck should fail after target removal`() {
val runner = test {
settingsGradleKts {
resolve("/examples/gradle/settings/settings-name-testproject.gradle.kts")
}
// only a single native target is defined there
buildGradleKts {
resolve("/examples/gradle/base/withNativePluginAndSingleTarget.gradle.kts")
}
addToSrcSet("/examples/classes/AnotherBuildConfig.kt")
// dump was created for multiple native targets
abiFile(projectName = "testproject") {
resolve("/examples/classes/AnotherBuildConfig.klib.dump")
}
runApiCheck()
}
runner.buildAndFail().apply {
assertTaskFailure(":klibApiCheck")
}
}
}

0 comments on commit 5826452

Please sign in to comment.