mirror of https://github.com/sbt/sbt.git
Merge pull request #1353 from dansanduleac/bugfix/failing-derived-settings-tests
SettingsTest: Don't allow generated strings (key names) to be empty
This commit is contained in:
commit
d8a8792946
|
|
@ -61,9 +61,12 @@ object SettingsTest extends Properties("settings") {
|
||||||
|
|
||||||
private def mkAttrKeys[T](nr: Int)(implicit mf: Manifest[T]): Gen[List[AttributeKey[T]]] =
|
private def mkAttrKeys[T](nr: Int)(implicit mf: Manifest[T]): Gen[List[AttributeKey[T]]] =
|
||||||
{
|
{
|
||||||
val alphaStr = Gen.alphaStr
|
import Gen._
|
||||||
|
val nonEmptyAlphaStr =
|
||||||
|
nonEmptyListOf(alphaChar).map(_.mkString).suchThat(_.forall(_.isLetter))
|
||||||
|
|
||||||
for {
|
for {
|
||||||
list <- Gen.listOfN(nr, alphaStr) suchThat (l => l.size == l.distinct.size)
|
list <- Gen.listOfN(nr, nonEmptyAlphaStr) suchThat (l => l.size == l.distinct.size)
|
||||||
item <- list
|
item <- list
|
||||||
} yield AttributeKey[T](item)
|
} yield AttributeKey[T](item)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue