It looks to me like you've got an implicit instance of Equality[Double]
in scope along the lines of org.scalactic.TolerantNumerics
, for which the documentation is here.
The example from the doc is:
implicit val doubleEquality = TolerantNumerics.tolerantDoubleEquality(0.01)
But it looks like somebody has instantiated it with a really big tolerance value in your case.
You may also consider trying explicit tolerance by using +-
:
assert(x.price() === 185.92 +- 0.01)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…