Skip to content

Commit

Permalink
fix Diss -> Persist in Form/Persist/Diss tests
Browse files Browse the repository at this point in the history
references #59
  • Loading branch information
chad-klumb authored Jun 21, 2021
1 parent 4caeafe commit d3304f6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/testthat/test-terms-Form-Persist-Diss.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
test_that("terms Form, Diss, Persist behave reasonably in dynamic contexts", {
nw0 <- network.initialize(100, dir = FALSE)
set.seed(0)
nw1 <- simulate(nw0 ~ Form(~edges) + Diss(~edges), coef = c(-5, 2), dynamic = TRUE, output = "final", time.slices = 1)
nw1 <- simulate(nw0 ~ Form(~edges) + Persist(~edges), coef = c(-5, 2), dynamic = TRUE, output = "final", time.slices = 1)
set.seed(0)
nw <- simulate(nw0 ~ Form(~edges) + Diss(~edges), coef = c(-5, 2), dynamic = TRUE, output = "final", time.slices = 10)
nw <- simulate(nw0 ~ Form(~edges) + Persist(~edges), coef = c(-5, 2), dynamic = TRUE, output = "final", time.slices = 10)
set.seed(0)
nwd <- simulate(nw0 ~ Form(~edges) + Diss(~edges), coef = c(-5, 2), dynamic = TRUE, output = "networkDynamic", time.slices = 10)
nwd <- simulate(nw0 ~ Form(~edges) + Persist(~edges), coef = c(-5, 2), dynamic = TRUE, output = "networkDynamic", time.slices = 10)

nw10 <- network.collapse(nwd, at = 10)
nw9 <- network.collapse(nwd, at = 9)
Expand Down Expand Up @@ -49,7 +49,7 @@ test_that("terms Form, Diss, Persist behave reasonably in dynamic contexts", {
expect_identical(s1, s2)

set.seed(0)
s3 <- simulate(nw0 ~ Form(~edges) + Diss(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Form(ff0), time.slices = 1)
s3 <- simulate(nw0 ~ Form(~edges) + Persist(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Form(ff0), time.slices = 1)
expect_identical(s1, s3[1,])

# Persist
Expand All @@ -64,7 +64,7 @@ test_that("terms Form, Diss, Persist behave reasonably in dynamic contexts", {
expect_identical(s1, s2)

set.seed(0)
s3 <- simulate(nw0 ~ Form(~edges) + Diss(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Persist(ff0), time.slices = 1)
s3 <- simulate(nw0 ~ Form(~edges) + Persist(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Persist(ff0), time.slices = 1)
expect_identical(s1, s3[1,])

# Diss
Expand All @@ -79,7 +79,7 @@ test_that("terms Form, Diss, Persist behave reasonably in dynamic contexts", {
expect_identical(-s1, s2)

set.seed(0)
s3 <- simulate(nw0 ~ Form(~edges) + Diss(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Diss(ff0), time.slices = 1)
s3 <- simulate(nw0 ~ Form(~edges) + Persist(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Diss(ff0), time.slices = 1)
expect_identical(-s1, s3[1,])

## non-durational, curved
Expand All @@ -97,7 +97,7 @@ test_that("terms Form, Diss, Persist behave reasonably in dynamic contexts", {
expect_identical(s1, s2)

set.seed(0)
s3 <- simulate(nw0 ~ Form(~edges) + Diss(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Form(ff1), time.slices = 1)
s3 <- simulate(nw0 ~ Form(~edges) + Persist(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Form(ff1), time.slices = 1)
expect_identical(s1, s3[1,])

# Persist
Expand All @@ -112,7 +112,7 @@ test_that("terms Form, Diss, Persist behave reasonably in dynamic contexts", {
expect_identical(s1, s2)

set.seed(0)
s3 <- simulate(nw0 ~ Form(~edges) + Diss(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Persist(ff1), time.slices = 1)
s3 <- simulate(nw0 ~ Form(~edges) + Persist(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Persist(ff1), time.slices = 1)
expect_identical(s1, s3[1,])

# Diss
Expand All @@ -127,7 +127,7 @@ test_that("terms Form, Diss, Persist behave reasonably in dynamic contexts", {
expect_identical(-s1, s2)

set.seed(0)
s3 <- simulate(nw0 ~ Form(~edges) + Diss(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Diss(ff1), time.slices = 1)
s3 <- simulate(nw0 ~ Form(~edges) + Persist(~edges), coef = c(-5, 2), dynamic = TRUE, output = "stats", monitor = ~Diss(ff1), time.slices = 1)
expect_identical(-s1, s3[1,])

set.seed(0)
Expand Down

0 comments on commit d3304f6

Please sign in to comment.