diff --git a/tests/testthat/testReference/NMdataConf_01.rds b/tests/testthat/testReference/NMdataConf_01.rds index 42c514e4..da4314de 100644 Binary files a/tests/testthat/testReference/NMdataConf_01.rds and b/tests/testthat/testReference/NMdataConf_01.rds differ diff --git a/tests/testthat/testReference/NMdataConf_02.rds b/tests/testthat/testReference/NMdataConf_02.rds index a2af1427..3629bf75 100644 Binary files a/tests/testthat/testReference/NMdataConf_02.rds and b/tests/testthat/testReference/NMdataConf_02.rds differ diff --git a/tests/testthat/testReference/NMreadExt_01.rds b/tests/testthat/testReference/NMreadExt_01.rds index 8563bfd8..d35f9c5d 100644 Binary files a/tests/testthat/testReference/NMreadExt_01.rds and b/tests/testthat/testReference/NMreadExt_01.rds differ diff --git a/tests/testthat/testReference/NMreadExt_02.rds b/tests/testthat/testReference/NMreadExt_02.rds index 8a1114b3..5c045cfd 100644 Binary files a/tests/testthat/testReference/NMreadExt_02.rds and b/tests/testthat/testReference/NMreadExt_02.rds differ diff --git a/tests/testthat/testReference/NMreadExt_03.rds b/tests/testthat/testReference/NMreadExt_03.rds index 80c5757f..e27219e8 100644 Binary files a/tests/testthat/testReference/NMreadExt_03.rds and b/tests/testthat/testReference/NMreadExt_03.rds differ diff --git a/tests/testthat/testReference/NMreadExt_04.rds b/tests/testthat/testReference/NMreadExt_04.rds index 9a5ea415..8dfb3ac4 100644 Binary files a/tests/testthat/testReference/NMreadExt_04.rds and b/tests/testthat/testReference/NMreadExt_04.rds differ diff --git a/tests/testthat/testReference/NMreadExt_05.rds b/tests/testthat/testReference/NMreadExt_05.rds index fd21aac3..7c45bf9e 100644 Binary files a/tests/testthat/testReference/NMreadExt_05.rds and b/tests/testthat/testReference/NMreadExt_05.rds differ diff --git a/tests/testthat/testReference/NMrelate_02.rds b/tests/testthat/testReference/NMrelate_02.rds deleted file mode 100644 index 4d156f2e..00000000 Binary files a/tests/testthat/testReference/NMrelate_02.rds and /dev/null differ diff --git a/tests/testthat/test_NMdataConf.R b/tests/testthat/test_NMdataConf.R index c4ea4ea6..7df968c9 100644 --- a/tests/testthat/test_NMdataConf.R +++ b/tests/testthat/test_NMdataConf.R @@ -2,6 +2,7 @@ context("NMdataConf") NMdataConf(reset=TRUE) + ## can't compare functions dropFuns <- function(x){ x$as.fun <- NULL x$file.mod <- NULL @@ -24,7 +25,7 @@ test_that("defaults",{ expect_equal_to_reference(defaults,fileRef) ## compareCols(readRDS(fileRef),defaults) - + }) test_that("reset",{ @@ -36,20 +37,6 @@ test_that("reset",{ defaults <- dropFuns(defaults) defaults2 <- dropFuns(defaults2) - ## defaults$as.fun <- NULL - ## defaults$file.mod <- NULL - ## defaults$file.cov <- NULL - ## defaults$file.ext <- NULL - ## defaults$file.phi <- NULL - ## defaults$file.shk <- NULL - ## defaults$modelname <- NULL - ## defaults2$as.fun <- NULL - ## defaults2$file.mod <- NULL - ## defaults2$file.cov <- NULL - ## defaults2$file.ext <- NULL - ## defaults2$file.phi <- NULL - ## defaults2$file.shk <- NULL - ## defaults2$modelname <- NULL expect_equal(defaults,defaults2) @@ -96,21 +83,6 @@ test_that("change fun in globalenv does not affect NMdataConf()",{ defaults <- dropFuns(defaults) defaults2 <- dropFuns(defaults2) - ## defaults$as.fun <- NULL - ## defaults$file.mod <- NULL - ## defaults$file.cov <- NULL - ## defaults$file.ext <- NULL - ## defaults$file.phi <- NULL - ## defaults$file.shk <- NULL - ## defaults$modelname <- NULL - ## defaults2$as.fun <- NULL - ## defaults2$file.mod <- NULL - ## defaults2$file.cov <- NULL - ## defaults2$file.ext <- NULL - ## defaults2$file.phi <- NULL - ## defaults2$file.shk <- NULL - ## defaults2$modelname <- NULL - expect_equal(defaults,defaults2) }) @@ -143,22 +115,6 @@ test_that("change fun in globalenv does not affect NMdataConf()",{ defaults <- dropFuns(defaults) defaults2 <- dropFuns(defaults2) - ## defaults$as.fun <- NULL - ## defaults$file.mod <- NULL - ## defaults$file.cov <- NULL - ## defaults$file.ext <- NULL - ## defaults$file.phi <- NULL - ## defaults$file.shk <- NULL - ## defaults$modelname <- NULL - - ## defaults2$as.fun <- NULL - ## defaults2$file.mod <- NULL - ## defaults2$file.cov <- NULL - ## defaults2$file.ext <- NULL - ## defaults2$file.phi <- NULL - ## defaults2$file.shk <- NULL - ## defaults2$modelname <- NULL - expect_equal(defaults,defaults2) }) @@ -173,17 +129,10 @@ test_that("deprecated use.rds",{ NMdataConf(formats.read=c("csv")) new <- NMdataConf() - ## can't compare functions - new$as.fun <- NULL - new$file.cov <- NULL - new$file.ext <- NULL - new$file.mod <- NULL - new$file.phi <- NULL - new$file.shk <- NULL - new$modelname <- NULL + new <- dropFuns(new) expect_equal_to_reference(new,fileRef) - compareCols(readRDS(fileRef),new) + ## compareCols(readRDS(fileRef),new) }) test_that("reset removes unknown",{ diff --git a/tests/testthat/test_NMreadExt.R b/tests/testthat/test_NMreadExt.R index d1e77de2..ad4ef0af 100644 --- a/tests/testthat/test_NMreadExt.R +++ b/tests/testthat/test_NMreadExt.R @@ -31,6 +31,7 @@ test_that("basic - all",{ if(F){ ref <- readRDS(fileRef) compareCols(ref,res) + compareCols(ref$pars,res$pars) } }) @@ -46,6 +47,7 @@ test_that("basic - all from multiple models",{ if(F){ ref <- readRDS(fileRef) compareCols(ref,res) + compareCols(ref$pars,res$pars) } }) @@ -61,9 +63,8 @@ test_that("muref - all",{ if(F){ ref <- readRDS(fileRef) - res - ref - + compareCols(ref,res) + compareCols(ref$pars,res$pars) } @@ -76,6 +77,14 @@ test_that("muref SAEM - all",{ res <- NMreadExt(file=file.ext,as.fun="data.table",return="all") expect_equal_to_reference(res,fileRef) + + if(F){ + ref <- readRDS(fileRef) + compareCols(ref,res) + compareCols(ref$pars,res$pars) + } + + }) test_that("muref SAEM - tableno options",{ diff --git a/tests/testthat/test_NMrelate.R b/tests/testthat/test_NMrelate.R index 8e8a708e..acf56083 100644 --- a/tests/testthat/test_NMrelate.R +++ b/tests/testthat/test_NMrelate.R @@ -48,6 +48,12 @@ test_that("merge with NMreadExt results",{ ) expect_equal_to_reference(res,fileRef) + + if(F){ + ref <- readRDS(fileRef) + compareCols(ref$ext.nofix, res$ext.nofix) + +} })