diff --git a/inst/tinytest/test-lfmcmc.R b/inst/tinytest/test-lfmcmc.R index 42835df..aa89b48 100644 --- a/inst/tinytest/test-lfmcmc.R +++ b/inst/tinytest/test-lfmcmc.R @@ -19,6 +19,7 @@ expect_silent(lfmcmc_model <- LFMCMC(model_sir)) # Check initialization expect_inherits(lfmcmc_model, "epiworld_lfmcmc") +expect_length(class(lfmcmc_model), 1) # Extract observed data from the model obs_data <- unname(as.integer(get_today_total(model_sir))) diff --git a/inst/tinytest/test-sir.R b/inst/tinytest/test-sir.R index 4913730..c9bcd46 100644 --- a/inst/tinytest/test-sir.R +++ b/inst/tinytest/test-sir.R @@ -29,6 +29,7 @@ expect_silent(sir_0 <- ModelSIR( # Check model initialization expect_inherits(sir_0, "epiworld_sir") expect_inherits(sir_0, "epiworld_model") +expect_length(class(sir_0), 2) expect_silent(agents_smallworld( sir_0, n = 50000, diff --git a/inst/tinytest/test-sirconn.R b/inst/tinytest/test-sirconn.R index b026c4f..0370284 100644 --- a/inst/tinytest/test-sirconn.R +++ b/inst/tinytest/test-sirconn.R @@ -36,6 +36,7 @@ expect_silent(sirconn_0 <- ModelSIRCONN( # Check model initialization expect_inherits(sirconn_0, "epiworld_sirconn") expect_inherits(sirconn_0, "epiworld_model") +expect_length(class(sirconn_0), 2) # Check model run with queuing ------------------------------------------------- expect_silent(verbose_off(sirconn_0)) diff --git a/inst/tinytest/test-sird.R b/inst/tinytest/test-sird.R index 2beddd2..4e20166 100644 --- a/inst/tinytest/test-sird.R +++ b/inst/tinytest/test-sird.R @@ -12,6 +12,7 @@ expect_silent(sird_0 <- ModelSIRD( # Check model initialization expect_inherits(sird_0, "epiworld_sird") expect_inherits(sird_0, "epiworld_model") +expect_length(class(sird_0), 2) expect_silent(agents_smallworld( sird_0, n = 10000, diff --git a/inst/tinytest/test-sis.R b/inst/tinytest/test-sis.R index 1b57afa..b4c3b62 100644 --- a/inst/tinytest/test-sis.R +++ b/inst/tinytest/test-sis.R @@ -11,6 +11,7 @@ expect_silent(sis_0 <- ModelSIS( # Check model initialization expect_inherits(sis_0, "epiworld_sis") expect_inherits(sis_0, "epiworld_model") +expect_length(class(sis_0), 2) expect_silent(agents_smallworld( sis_0, n = 2000,