~jan0sch/smederee

Showing details for patch 30f419688493197fd6ebc31e2b10fd28e76cda31.
2023-08-09 (Wed), 12:49 PM - Jens Grassel - 30f419688493197fd6ebc31e2b10fd28e76cda31

i18n: Fix generator causing flaky test.

Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • modules/i18n/src/test/scala/de/smederee/i18n/LanguageCodeTest.scala with 1 added and 1 removed lines
diff -rN -u old-smederee/modules/i18n/src/test/scala/de/smederee/i18n/LanguageCodeTest.scala new-smederee/modules/i18n/src/test/scala/de/smederee/i18n/LanguageCodeTest.scala
--- old-smederee/modules/i18n/src/test/scala/de/smederee/i18n/LanguageCodeTest.scala	2025-01-15 12:38:43.119802917 +0000
+++ new-smederee/modules/i18n/src/test/scala/de/smederee/i18n/LanguageCodeTest.scala	2025-01-15 12:38:43.119802917 +0000
@@ -24,7 +24,7 @@
 import org.scalacheck.Prop._
 
 final class LanguageCodeTest extends ScalaCheckSuite {
-  val genLocale: Gen[Locale] = Gen.oneOf(Locale.getAvailableLocales.toList)
+  val genLocale: Gen[Locale] = Gen.oneOf(Locale.getAvailableLocales.toList.filter(_.getISO3Language.nonEmpty))
   given Arbitrary[Locale]    = Arbitrary(genLocale)
 
   val genLanguageCode: Gen[LanguageCode] = genLocale.map(_.getISO3Language).filter(_.nonEmpty).map(LanguageCode.apply)