Skip to content

Commit

Permalink
Add missing tests (#7109)
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisGabin committed Apr 7, 2024
1 parent dd33f43 commit 301f8bd
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,28 @@ class SuppressionSpec {
assertThat(compileContentForTest("""@file:Suppress("detekt:$value")""").isSuppressedBy()).isFalse()
assertThat(compileContentForTest("""@file:Suppress("Detekt.$value")""").isSuppressedBy()).isFalse()
}

@Test
fun checkAllAnnotations1() {
val file = compileContentForTest(
"""
@file:Suppress("Foo")
@file:SuppressWarnings("RuleId")
""".trimIndent()
)
assertThat(file.isSuppressedBy()).isTrue()
}

@Test
fun checkAllAnnotations2() {
val file = compileContentForTest(
"""
@file:Suppress("RuleId")
@file:SuppressWarnings("Foo")
""".trimIndent()
)
assertThat(file.isSuppressedBy()).isTrue()
}
}

private fun KtFile.getClass(): KtElement {
Expand Down

0 comments on commit 301f8bd

Please sign in to comment.