Skip to content

Commit

Permalink
Update 10-testing.Rmd
Browse files Browse the repository at this point in the history
add gdbsource info
  • Loading branch information
ChristineStawitz-NOAA authored Nov 16, 2023
1 parent fb49f78 commit 7849a22
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 10-testing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,15 @@ explanation and concrete examples.
To test FIMS R functions interactively and locally, use `devtools::install()` rather than `devtools::load_all()`. This is because using `load_all()` will turn on the debugger, bloating the .o file, and may lead to a compilation error (e.e., `Fatal error: can't write 326 bytes to section .text of FIMS.o: 'file too big'
as: FIMS.o: too many sections (35851)`). Note that useful interactive tests should should be converted into {testthat} or googletest tests.
### Testing using `gdbsource`
You can interactively debug C++ code using `TMB::gdbsource()` in RStudio. Just add these two lines to the top of the test-fims-estimation.R file
```r
require(testthat)
devtools::load_all("C:\\Users\\chris\\noaa-git\\FIMS")
```
### R testthat template
The format for an individual testthat test is is:
Expand Down

0 comments on commit 7849a22

Please sign in to comment.