Merck / simtrial

Clinical trial simulation for time-to-event endpoints
https://merck.github.io/simtrial/
GNU General Public License v3.0
18 stars 8 forks source link

Make tests self-contained and suppress printing #206

Closed nanxstats closed 8 months ago

nanxstats commented 8 months ago

As recommended by R Packages, this PR makes all existing tests self-contained by creating helper functions to wrap the top-level logic that used to have awkward "test file scope". Now all test files only contain individual test_that() blocks.

I also used invisible(capture.output()) to suppress printing from tests for MaxCombo and WLR, where survMisc::comp() calls will generate long printed outputs.