mirror of https://github.com/sbt/sbt.git
Test for Analysis split/merge.
Requires scalacheck generators for Analysis and its subobjects. These may be useful for other tests in the future. Also fixes a bug in RelationTest.
This commit is contained in:
parent
6e0281fa1c
commit
41e96dbc66
|
|
@ -52,7 +52,7 @@ object RelationTest extends Properties("Relation")
|
|||
}
|
||||
|
||||
property("Groups correctly") = forAll { (entries: List[(Int, Double)], randomInt: Int) =>
|
||||
val splitInto = randomInt % 10 + 1 // Split into 1-10 groups.
|
||||
val splitInto = math.abs(randomInt) % 10 + 1 // Split into 1-10 groups.
|
||||
val rel = Relation.empty[Int, Double] ++ entries
|
||||
val grouped = rel groupBy (_._1 % splitInto)
|
||||
all(grouped.toSeq) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue