Compare two values for testing
Compares actual against expected and
returns a testcraft Expect value (Expect_pass,
Expect_stop, or Expect_hold) describing the
outcome. Designed to be used with assert():
assert(expect_equal(a, b)).
actual (Any): The computed value to
check.
expected (Any): The value
actual is expected to equal.
tolerance (Float): = 1e-9 Absolute
tolerance used for Float comparisons.
A VExpect value: passing, stopping, or holding (on
NA).
expect_equal(1, 1)
assert(expect_equal(0.1 + 0.2, 0.3, tolerance = 1e-9))