Skip to content

Commit

Permalink
cleanup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karchjd committed Mar 10, 2023
1 parent 19d6168 commit bf2503d
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tests/testthat/test-bmtest.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@ testthat::test_that('All computations give correct results', {
expected_table <- data.frame(
var = c("y1", "y2"),
`test[asym]` = c("t-Approximation", "t-Approximation"),
`stat[asym]` = c(0.000000, 6.363961),
`stat[asym]` = c(0, 6.363961),
`df[asym]` = c(18, 18),
`p[asym]` = c(1.000000e+00, 5.394655e-06),
`p[asym]` = c(1, 5.394655e-06),
`relEff[asym]` = c(0.500, 0.125),
`cil[asym]` = c(0.252403963, 0.001201982),
`ciu[asym]` = c(0.747596, 0.248798),
`test[randomPerm]` = c("Random Permutations", "Random Permutations"),
`stat[randomPerm]` = c(0.000, 6.364),
`stat[randomPerm]` = c(0, 6.364),
`df[randomPerm]` = c(NA, NA),
`p[randomPerm]` = c(0.654, 0.002),
`relEff[randomPerm]` = c(0.500, 0.125),
`cil[randomPerm]` = c(0.282, 0.000),
`ciu[randomPerm]` = c(0.718, 0.250),
`relEff[randomPerm]` = c(0.5, 0.125),
`cil[randomPerm]` = c(0.282, 0),
`ciu[randomPerm]` = c(0.718, 0.25),
`test[fullPerm]` = c("All Permutations", "All Permutations"),
`stat[fullPerm]` = c(0.000000, 6.363961),
`stat[fullPerm]` = c(0, 6.363961),
`df[fullPerm]` = c(NA, NA),
`p[fullPerm]` = c(1.000000000, 0.002727922),
`relEff[fullPerm]` = c(0.500, 0.125),
`p[fullPerm]` = c(1, 0.002727922),
`relEff[fullPerm]` = c(0.5, 0.125),
`cil[fullPerm]` = c(NA, NA),
`ciu[fullPerm]` = c(NA, NA),
check.names = FALSE
Expand Down Expand Up @@ -156,19 +156,19 @@ testthat::test_that('Formula Interface', {
`stat[asym]` = 0,
`df[asym]` = 18,
`p[asym]` = 1,
`relEff[asym]` = 0.500,
`relEff[asym]` = 0.5,
`cil[asym]` = 0.252403963,
`ciu[asym]` = 0.747596,
`test[randomPerm]` = "Random Permutations",
`stat[randomPerm]` = 0.000,
`stat[randomPerm]` = 0,
`p[randomPerm]` = 0.654,
`relEff[randomPerm]` = 0.500,
`relEff[randomPerm]` = 0.5,
`cil[randomPerm]` = 0.282,
`ciu[randomPerm]` = 0.718,
`test[fullPerm]` = "All Permutations",
`stat[fullPerm]` = 0.000000,
`p[fullPerm]` = 1.000000000,
`relEff[fullPerm]` = 0.500,
`stat[fullPerm]` = 0,
`p[fullPerm]` = 1,
`relEff[fullPerm]` = 0.5,
check.names = FALSE
)
testthat::expect_equal(res_table, expected_table, tolerance = 0.0001, ignore_attr = TRUE)
Expand Down

0 comments on commit bf2503d

Please sign in to comment.