tests/testthat/test-permuteVariables.R

test_that("permute/swap", {
  x <- qlone(1); y <- qlone(2); z <- qlone(3)
  p <- x^4 + 2*y^3 + 3*z^2 - 4
  expect_true(permuteVariables(p, c(1, 3, 2)) == swapVariables(p, 2, 3))
  expect_error(permuteVariables(p, c(1, 3, 4)))
})

Try the qspray package in your browser

Any scripts or data that you put into this service are public.

qspray documentation built on Sept. 11, 2024, 5:33 p.m.