API Docs for: 1.0.0
Show:

Assert Class

Additional assertions for unit tests.

Item Index

Methods

Methods

areWithinEpsilon

(
  • expected
  • actual
  • epsilon
)
static

Asserts that the mantissas of two values are with epsilon of each other. (The test automatically fails if the exponents are different.)

Parameters:

  • expected Number

    the expected value

  • actual Number

    the actual value to test

  • epsilon Number

    the maximum allowed difference in the mantissas

complexWithinEpsilon

(
  • expected
  • actual
  • epsilon
)
static

Asserts that both real and imaginary parts of two complex values are with epsilon of each other. (The test automatically fails if the exponents are different.)

Parameters: