Skip to content

Commit

Permalink
more useful memcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed May 9, 2024
1 parent aa526ad commit d247299
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/memcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
- name: Memory check
run: |
R -d "valgrind --tool=memcheck --leak-check=full" --vanilla < memcheck.R
R -d valgrind -f memcheck.R
26 changes: 12 additions & 14 deletions memcheck.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
devtools::load_all()
library(testthat)
test_that("run sim AR and VAR functions for memory checks", {
expect_no_error(capture_output(sim_mvgam(family = gaussian(),
trend_model = RW())))
expect_no_error(capture_output(sim_mvgam(family = gaussian(),
trend_model = AR(p = 1))))
expect_no_error(capture_output(sim_mvgam(family = gaussian(),
trend_model = AR(p = 2))))
expect_no_error(capture_output(sim_mvgam(family = gaussian(),
trend_model = AR(p = 3))))
expect_no_error(capture_output(sim_mvgam(family = gaussian(),
trend_model = VAR())))
expect_no_error(capture_output(sim_mvgam(family = gaussian(),
trend_model = VAR(cor = TRUE))))
})
capture_output(sim_mvgam(family = gaussian(),
trend_model = RW()))
capture_output(sim_mvgam(family = gaussian(),
trend_model = AR(p = 1)))
capture_output(sim_mvgam(family = gaussian(),
trend_model = AR(p = 2)))
capture_output(sim_mvgam(family = gaussian(),
trend_model = AR(p = 3)))
capture_output(sim_mvgam(family = gaussian(),
trend_model = VAR()))
capture_output(sim_mvgam(family = gaussian(),
trend_model = VAR(cor = TRUE)))

0 comments on commit d247299

Please sign in to comment.