aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-11-01 10:39:29 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2022-11-01 10:39:29 +0100
commit0c18f5de9b2f948d0b5e22a3b3deed16d64d8006 (patch)
tree8a8eabc745b0f0596b1467a1ed4f57623817ac7d /tests/testthat
parentfd4bd411df739903279d8b52faa19d5059afbda7 (diff)
Fix illparms tests
Diffstat (limited to 'tests/testthat')
-rw-r--r--tests/testthat/test_mhmkin.R2
-rw-r--r--tests/testthat/test_saemix_parent.R6
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/testthat/test_mhmkin.R b/tests/testthat/test_mhmkin.R
index 72b81fec..9fd29c50 100644
--- a/tests/testthat/test_mhmkin.R
+++ b/tests/testthat/test_mhmkin.R
@@ -24,7 +24,7 @@ test_that("Multiple hierarchical kinetic models can be fitted and diagnosed", {
hfit_sfo_tc <- update(hfits[["SFO", "tc"]],
covariance.model = diag(c(0, 1)))
- expect_equal(illparms(hfit_sfo_tc), character(0))
+ expect_equal(as.character(illparms(hfit_sfo_tc)), character(0))
expect_silent(print(illparms(hfit_sfo_tc)))
test_summary <- summary(hfit_sfo_tc)
diff --git a/tests/testthat/test_saemix_parent.R b/tests/testthat/test_saemix_parent.R
index e7574b01..79c5fa69 100644
--- a/tests/testthat/test_saemix_parent.R
+++ b/tests/testthat/test_saemix_parent.R
@@ -9,9 +9,9 @@ test_that("Parent fits using saemix are correctly implemented", {
# mmkin_sfo_1 was generated in the setup script
# We did not introduce variance of parent_0 in the data generation
# This is correctly detected
- expect_equal(illparms(sfo_saem_1), "sd(parent_0)")
+ expect_equal(as.character(illparms(sfo_saem_1)), "sd(parent_0)")
# So we have also done a fit without this variance
- expect_equal(illparms(sfo_saem_1_reduced), character(0))
+ expect_equal(as.character(illparms(sfo_saem_1_reduced)), character(0))
expect_silent(print(illparms(sfo_saem_1_reduced)))
# We cannot currently do the fit with completely fixed initial values
@@ -22,7 +22,7 @@ test_that("Parent fits using saemix are correctly implemented", {
expect_error(update(mmkin_sfo_1, models = c("SFOOO")), "Please supply models.*")
sfo_saem_1_mkin <- saem(mmkin_sfo_1, quiet = TRUE, transformations = "mkin")
- expect_equal(illparms(sfo_saem_1_mkin), "sd(parent_0)")
+ expect_equal(as.character(illparms(sfo_saem_1_mkin)), "sd(parent_0)")
sfo_saem_1_reduced_mkin <- update(sfo_saem_1_mkin, no_random_effect = "parent_0")
# The endpoints obtained do not depend on the transformation

Contact - Imprint