NumericMatchers

org.specs2.matcher.NumericMatchers
See theNumericMatchers companion object

Matchers for Numerical values

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Matchers
object Matchers.type
trait MustMatchers
object MustMatchers.type
object MustThrownMatchers.type
object ShouldMatchers.type
object ShouldThrownMatchers.type
object NumericMatchers.type
Show all

Members list

Value members

Concrete methods

def <[S](n: S)(using evidence$19: Ordering[S]): BeLessThan[S]

alias for beLessThan

alias for beLessThan

Attributes

def <=[S](n: S)(using evidence$15: Ordering[S]): BeLessThanOrEqualTo[S]

alias for beLessThanOrEqualTo

alias for beLessThanOrEqualTo

Attributes

def >[S](n: S)(using evidence$27: Ordering[S]): BeGreaterThan[S]

alias for beGreaterThan

alias for beGreaterThan

Attributes

def >=[S](n: S)(using evidence$23: Ordering[S]): Matcher[S]

alias for beGreaterThanOrEqualTo

alias for beGreaterThanOrEqualTo

Attributes

def beBetween[T](t1: T, t2: T)(using evidence$40: Ordering[T]): BetweenMatcher[T]

matches if a value is between 2 others according to an Ordering

matches if a value is between 2 others according to an Ordering

Attributes

def beCloseTo[S](n: S, delta: S)(using evidence$28: Numeric[S]): Matcher[S]

matches if actual = n +/- delta

matches if actual = n +/- delta

Attributes

def beCloseTo[S](delta: PlusOrMinus[S])(using evidence$30: Numeric[S]): Matcher[S]

matches if actual = n +/- delta

matches if actual = n +/- delta

Attributes

def beCloseTo[S](target: S, figures: SignificantFigures)(using evidence$36: Numeric[S]): Matcher[S]

matches if target - actual < 10 pow (log actual - significantDigits)

matches if target - actual < 10 pow (log actual - significantDigits)

Attributes

def beCloseTo[S](target: SignificantTarget[S])(using evidence$37: Numeric[S]): Matcher[S]
def beGreaterThan[S](n: S)(using evidence$24: Ordering[S]): BeGreaterThan[S]

matches if actual > n

matches if actual > n

Attributes

def beGreaterThanOrEqualTo[S](n: S)(using evidence$20: Ordering[S]): Matcher[S]

matches if actual >= n

matches if actual >= n

Attributes

def beLessThan[S](n: S)(using evidence$16: Ordering[S]): BeLessThan[S]

matches if actual < n

matches if actual < n

Attributes

def beLessThanOrEqualTo[S](n: S)(using evidence$12: Ordering[S]): BeLessThanOrEqualTo[S]

matches if actual <= n

matches if actual <= n

Attributes

def be_<[S](n: S)(using evidence$18: Ordering[S]): BeLessThan[S]

alias for beLessThan

alias for beLessThan

Attributes

def be_<=[S](n: S)(using evidence$14: Ordering[S]): BeLessThanOrEqualTo[S]

alias for beLessThanOrEqualTo

alias for beLessThanOrEqualTo

Attributes

def be_>[S](n: S)(using evidence$26: Ordering[S]): BeGreaterThan[S]

alias for beGreaterThan

alias for beGreaterThan

Attributes

def be_>=[S](n: S)(using evidence$22: Ordering[S]): Matcher[S]

alias for beGreaterThanOrEqualTo

alias for beGreaterThanOrEqualTo

Attributes

def be_~[S](n: S)(delta: S)(using evidence$33: Numeric[S]): Matcher[S]

alias for beCloseTo

alias for beCloseTo

Attributes

def be_~[S](delta: PlusOrMinus[S])(using evidence$35: Numeric[S]): Matcher[S]

alias for beCloseTo

alias for beCloseTo

Attributes

def between[T](t1: T, t2: T)(using evidence$41: Ordering[T]): BetweenMatcher[T]
def closeTo[S](n: S, delta: S)(using evidence$29: Numeric[S]): Matcher[S]
def closeTo[S](delta: PlusOrMinus[S])(using evidence$31: Numeric[S]): Matcher[S]
def closeTo[S](target: S, figures: SignificantFigures)(using evidence$38: Numeric[S]): Matcher[S]
def closeTo[S](target: SignificantTarget[S])(using evidence$39: Numeric[S]): Matcher[S]
def greaterThan[S](n: S)(using evidence$25: Ordering[S]): BeGreaterThan[S]
def greaterThanOrEqualTo[S](n: S)(using evidence$21: Ordering[S]): Matcher[S]
def lessThan[S](n: S)(using evidence$17: Ordering[S]): BeLessThan[S]
def lessThanOrEqualTo[S](n: S)(using evidence$13: Ordering[S]): BeLessThanOrEqualTo[S]

matches if actual <= n

matches if actual <= n

Attributes

def ~[S](n: S)(delta: S)(using evidence$32: Numeric[S]): Matcher[S]

alias for beCloseTo

alias for beCloseTo

Attributes

def ~[S](delta: PlusOrMinus[S])(using evidence$34: Numeric[S]): Matcher[S]

alias for beCloseTo

alias for beCloseTo

Attributes

Givens

Givens

given given_Conversion_S_CanHaveDelta[S](using evidence$10: Numeric[S]): given_Conversion_S_CanHaveDelta[S]

implicit definition to create delta for the beCloseTo matcher

implicit definition to create delta for the beCloseTo matcher

Attributes

Extensions

Extensions

extension [N](target: N)(using evidence$11: Numeric[N])

implicit definition to create significant figures for the beCloseTo matcher

implicit definition to create significant figures for the beCloseTo matcher

Attributes

extension (value: Int)

implicit definition to create significant figures for the beCloseTo matcher

implicit definition to create significant figures for the beCloseTo matcher

Attributes

implicit definition to create significant figures for the beCloseTo matcher

implicit definition to create significant figures for the beCloseTo matcher

Attributes