diff --git a/util/relation/src/test/scala/RelationTest.scala b/util/relation/src/test/scala/RelationTest.scala index de63fe893..03b728915 100644 --- a/util/relation/src/test/scala/RelationTest.scala +++ b/util/relation/src/test/scala/RelationTest.scala @@ -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) {