Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Mar 21, 2024
1 parent 72c1d16 commit 74bf65e
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -422,18 +422,20 @@ object CboOperationSuite extends CboSuiteBase {
private object PlanModelWithStats {
implicit class PlanModelWithStatsImplicits[T <: AnyRef](model: PlanModelWithStats[T]) {
def assertPlanOpsLte(bounds: (Int, Int, Int, Int)): Unit = {
val actual = (
model.childrenOfCount,
model.withNewChildrenCount,
model.hashCodeCount,
model.equalsCount)
assert(
List(
model.childrenOfCount,
model.withNewChildrenCount,
model.hashCodeCount,
model.equalsCount).zip(List(bounds._1, bounds._2, bounds._3, bounds._4)).forall {
case (count, bound) =>
count <= bound
},
List(actual._1, actual._2, actual._3, actual._4)
.zip(List(bounds._1, bounds._2, bounds._3, bounds._4))
.forall {
case (count, bound) =>
count <= bound
},
s"Assertion failed. The expected bounds: $bounds, actual: " +
s"${(model.childrenOfCount, model.withNewChildrenCount, model.hashCodeCount,
model.equalsCount)}"
s"$actual"
)
}
}
Expand Down

0 comments on commit 74bf65e

Please sign in to comment.