# test for equality of the saved result and the actual result of a dontrun example
test.minimum <- function() {
  # we compute the actual object
  runit.dontrunMinimum.actual <- Minimum(Norm(), Pois())
  # we load the saved object for comparison
  #   we assume that this test is called from within the script in the upper directory
  # we compare the stored result with the calculated one
  #   (a comparison with identical (ignoring the environment) gives FALSE...
  result <- all.equal(runit.dontrunMinimum.actual,
  # we check whether the result is TRUE and if not, we write the message
  #   coming from the result
  checkEquals(is.logical(result) && result, TRUE, msg=paste(result, sep="", collapse="\n"))

Try the distr package in your browser

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

distr documentation built on July 12, 2018, 9:02 a.m.