tests/testthat/test-mpoly-equal.R

context("mpoly == mpoly")

test_that("basic", {
  
  expect_true(mp("x + y^2") == mp("x + y^2"))
  expect_false(mp("x + y^2") == mp("x"))
  expect_error(
    mp("2") == 2,
    "e1 and e2 must be of class mpoly.",
    fixed = TRUE
  )
  
})



context("mpoly != mpoly")

test_that("basic", {
  
  expect_false(mp("x + y^2") != mp("x + y^2"))
  expect_true( mp("x + y^2") != mp("y^2"))
  expect_error(
    mp("2") != 2,
    "e1 and e2 must be of class mpoly.",
    fixed = TRUE
  )
  
})

Try the mpoly package in your browser

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

mpoly documentation built on March 26, 2020, 7:33 p.m.