Skip to content

Commit

Permalink
add failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
YukiMatsumura committed Nov 18, 2024
1 parent 9ff0aeb commit 22b2d6c
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,40 @@ class FlagTypeExpiryDateIllegalParamDetectorText : LintDetectorTest() {

@Test
fun testExpireDateFormatNoWarning() {
lint()
.files(
stabBooleanFlag,
stabFlagType,
kotlin(
"""
package foo
import tv.abema.flagfit.FlagType
import tv.abema.flagfit.annotation.BooleanFlag
import tv.abema.flagfit.FlagType.Companion.OWNER_NOT_DEFINED
import tv.abema.flagfit.FlagType.Companion.EXPIRY_DATE_INFINITE
interface Example {
@BooleanFlag(
key = "new-awesome-feature",
defaultValue = false
)
@FlagType.WorkInProgress(
owner = "Hoge Fuga",
expiryDate = "2023-12-10"
)
fun awesomeFeatureEnabled(): Boolean
}
""".trimIndent()
)
)
.issues(*issues.toTypedArray())
.allowMissingSdk()
.run()
.expectClean()
}

@Test
fun testExpiryDateNotDefinedExpireDateFormatNoWarning() {
lint()
.files(
stabBooleanFlag,
Expand Down

0 comments on commit 22b2d6c

Please sign in to comment.