Skip to content

Commit

Permalink
adding expect_equal for new test
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Thorson committed Feb 2, 2024
1 parent 8d091e0 commit 86083d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/testthat/test-platform.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,16 @@ test_that("dsem adds variances ", {
data = ts( log(isle_royale[,2:3]), start=1959)

sem = "
wolves <-> wolves, 0, sd1
moose <-> moose, 0, sd2
"
# initial first without delta0 (to improve starting values)
fit = dsem( sem = sem,
fit1 = dsem( sem = "",
tsdata = data )
# initial first without delta0 (to improve starting values)
fit2 = dsem( sem = sem,
tsdata = data )
# Check objective function
expect_equal( as.numeric(fit1$opt$obj), as.numeric(fit2$opt$obj), tolerance=1e-2 )
})

0 comments on commit 86083d3

Please sign in to comment.