tests/testthat/test-changeVariables.R

test_that("changeVariables", {
  f <- function(a, X, Y) {
    a^2 / (a + 1) * X^2*Y  +  (3*a - 2) / a * Y^2
  }
  a <- qlone(1)
  X <- Qlone(1)
  Y <- Qlone(2)
  Qspray <- f(a, X, Y)
  U <- X + a
  V <- Y + a
  expect_true(changeVariables(Qspray, list(U, V)) == f(a, U, V))
})

Try the symbolicQspray package in your browser

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

symbolicQspray documentation built on Sept. 11, 2024, 5:15 p.m.