Skip to content

Commit 2ac6825

Browse files
committed
Update signif digits for sim_gs_n() test to verify bounds from {gsDesign2}
1 parent 7fc202b commit 2ac6825

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
## Programming improvements
99

1010
- Added an internal helper function `cut_from_design()` to automatically generate cuttings based on the design object (#350, thanks to @yihui).
11+
- Updated significant digits required for `sim_gs_n()` test to verify the asymptotic theory from {gsDesign2}.
1112

1213
# simtrial 1.0.1
1314

tests/testthat/test-unvalidated-sim_gs_n.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,12 @@ test_that("Updating bounds changes the simulation results", {
706706
)
707707
observed <- run2[, c("planned_upper_bound", "planned_lower_bound",
708708
"updated_upper_bound", "updated_lower_bound")]
709+
710+
# Only need to test to 6 significant digits to verify the asymptotic theory
711+
# from gsDesign2
712+
expected <- lapply(expected, function(x) signif(x, digits = 6))
713+
observed <- lapply(observed, function(x) signif(x, digits = 6))
714+
709715
expect_equal(observed, expected, ignore_attr = TRUE)
710716
})
711717

0 commit comments

Comments
 (0)