R Under development (unstable) (2024-09-06 r87103 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > if (file.exists("_options.R")) source("_options.R") > library(panelPomp,quietly=TRUE) > > TESTS_PASS <- NULL > test <- function(expr1,expr2,all="TESTS_PASS",env=parent.frame(),...) + panelPomp:::test(expr1,expr2,all=all,env=env,...) > > ppo <- panelRandomWalk(U=2,N=5) > > pmf <- mif2(ppo,Np=10,rw.sd=rw_sd(X.0=0.2),cooling.fraction.50=0.5, + cooling.type="geometric") > > test(wQuotes( + "Error : in ''traces'': name(s) ''par'' correspond to no parameter(s).\n"), + traces(pmf,pars="par")) [1] TRUE > > test( + wQuotes("Error : in ''coef<-'': cannot change parameters of a filtered object.\n"), + {coef(pmf) <- c("test" = 1)} + ) [1] TRUE > > test( + wQuotes("Error : in ''shared<-'': cannot change parameters of a filtered object.\n"), + {shared(pmf) <- c("test" = 1)} + ) [1] TRUE > > test( + wQuotes("Error : in ''specific<-'': cannot change parameters of a filtered object.\n"), + {specific(pmf) <- c("test[unit1]" = 1)} + ) [1] TRUE > > ## check whether all tests passed > all(get(eval(formals(test))$all)) [1] TRUE > if (!all(get(eval(formals(test))$all))) stop("Not all tests passed!") > > proc.time() user system elapsed 0.70 0.09 2.53