All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scalaprops.TestResult.scala Maven / Gradle / Ivy

package scalaprops

private[scalaprops] final case class TestResult(
  name: String,
  duration: Long,
  maxSize: Int,
  minSuccessful: Int
) {
  def asSimpleString: String = s"$duration $name $maxSize $minSuccessful"
}

private[scalaprops] object TestResult {

  def formatResults(results: Seq[TestResult], count: Int): String = {
    results.sortBy(_.duration)(
      implicitly[scala.Ordering[Long]].reverse
    ).iterator.take(count).map(_.asSimpleString).mkString("\n")
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy