Equality
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Equality.type
Members list
Value members
Concrete methods
Defines equality for play.api.libs.json.JsNumber with tolerance. When with tolerance, it will compare two JsNumber with the given tolerance. For example, when tolerance is t and given value is x, it will compare x - t <= y <= x + t.
Defines equality for play.api.libs.json.JsNumber with tolerance. When with tolerance, it will compare two JsNumber with the given tolerance. For example, when tolerance is t and given value is x, it will compare x - t <= y <= x + t.
Attributes
Implicits
Implicits
Prove that play.api.libs.json.JsNumber is Numeric. This enables +- operator for JsNumber.
Prove that play.api.libs.json.JsNumber is Numeric. This enables +- operator for JsNumber.
Attributes
- Example
-
import org.scalatest.matchers.should._ import Equality.jsNumberIsNumeric val json1 = JsNumber(1.0000) val json2 = JsNumber(1.00001) json1 shouldEqual json2 +- JsNumber(0.0001) // => true
Defines equality for play.api.libs.json.JsValue. Requires implicit org.scalactic.Equality to provide numerical tolerance.
Defines equality for play.api.libs.json.JsValue. Requires implicit org.scalactic.Equality to provide numerical tolerance.