From 22b2d6ca22adcadaf02c5eef0a74e2ba346a5ee0 Mon Sep 17 00:00:00 2001 From: yuki312 Date: Mon, 18 Nov 2024 19:52:16 +0900 Subject: [PATCH] add failed test --- ...gTypeExpiryDateIllegalParamDetectorText.kt | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/flagfit-lint/src/test/java/tv/abema/flagfit/FlagTypeExpiryDateIllegalParamDetectorText.kt b/flagfit-lint/src/test/java/tv/abema/flagfit/FlagTypeExpiryDateIllegalParamDetectorText.kt index 34406e9..69d01ae 100644 --- a/flagfit-lint/src/test/java/tv/abema/flagfit/FlagTypeExpiryDateIllegalParamDetectorText.kt +++ b/flagfit-lint/src/test/java/tv/abema/flagfit/FlagTypeExpiryDateIllegalParamDetectorText.kt @@ -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,