Skip to content

Commit

Permalink
fix error from copilot ... add little test.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinteractive committed Oct 10, 2024
1 parent 051ae3d commit 0ca199c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ h_tmb_version_sufficient <- function() {
# we can check like this:
tmb_config <- TMB::config(DLL = "mmrm")
tape_deterministic <- tmb_config$tmbad_deterministic_hash
!is_null(tape_deterministic)
!is.null(tape_deterministic)
}

#' Warn if TMB is Configured to Use Non-Deterministic Hash for Tape Optimizer
Expand Down
7 changes: 7 additions & 0 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,13 @@ test_that("h_drop_levels works as expected", {
)
})

# h_tmb_version_sufficient ----

test_that("h_tmb_version_sufficient works as expected", {
skip_if(utils::packageVersion("TMB") < "1.9.15")
expect_true(h_tmb_version_sufficient())
})

# h_tmb_warn_non_deterministic ----

test_that("h_tmb_warn_non_deterministic works as expected", {
Expand Down

0 comments on commit 0ca199c

Please sign in to comment.