diff --git a/src/core/probably.scala b/src/core/probably.scala index c0b5955..11d5c29 100644 --- a/src/core/probably.scala +++ b/src/core/probably.scala @@ -53,9 +53,9 @@ case class TestId(name: Text, suite: Maybe[TestSuite], codepoint: Codepoint): val timestamp: Long = System.currentTimeMillis import textWidthCalculation.uniform lazy val id: Text = (suite.hashCode ^ name.hashCode).hex.pad(6, Rtl, '0').take(6, Rtl) - lazy val ids: List[Text] = id :: suite.mm(_.id.ids).or(Nil) + lazy val ids: List[Text] = id :: suite.let(_.id.ids).or(Nil) def apply[T](ctx: TestContext ?=> T): Test[T] = Test[T](this, ctx(using _)) - def depth: Int = suite.mm(_.id.depth).or(0) + 1 + def depth: Int = suite.let(_.id.depth).or(0) + 1 class TestSuite(val name: Text, val parent: Maybe[TestSuite] = Unset)(using codepoint: Codepoint): override def equals(that: Any): Boolean = that.matchable(using Unsafe) match diff --git a/src/core/report.scala b/src/core/report.scala index 76966f0..5885ecb 100644 --- a/src/core/report.scala +++ b/src/core/report.scala @@ -233,7 +233,7 @@ class TestReport(using Environment): case class Summary(status: Status, id: TestId, count: Int, min: Long, max: Long, avg: Long): def indentedName: Output = - val depth = id.suite.mm(_.id.depth).or(0) + 1 + val depth = id.suite.let(_.id.depth).or(0) + 1 val title = if status == Status.Suite then e"${colors.Silver}($Bold(${id.name}))" @@ -384,7 +384,7 @@ class TestReport(using Environment): benches(lines).groupBy(_.test.suite).foreach: (suite, benchmarks) => val ribbon = Ribbon(colors.DarkGreen.srgb, colors.MediumSeaGreen.srgb, colors.PaleGreen.srgb) - Out.println(ribbon.fill(e"${suite.mm(_.id.id).or(t"")}", e"Benchmarks", e"${suite.mm(_.name).or(t"")}")) + Out.println(ribbon.fill(e"${suite.let(_.id.id).or(t"")}", e"Benchmarks", e"${suite.let(_.name).or(t"")}")) val comparisons: List[ReportLine.Bench] = benchmarks.filter(!_.benchmark.baseline.unset).to(List)