tests/testthat/test-quadratic.R

context("quadratic")

## Someone of these should return complex, but they don't because R does
## not support complex natively.
expect_equal(quadratic(1, 0, -1), c(-1, 1))
expect_equal(quadratic(4, -4, 1), c(0.5, 0.5))

expect_equal(quadratic2(1, 0, -1), c(-1, 1))
expect_equal(quadratic2(4, -4, 1), c(0.5, 0.5))
k3jph/cmna-pkg documentation built on Dec. 21, 2021, 5:15 a.m.