diff --git a/tests/testthat/test-outstandR.R b/tests/testthat/test-outstandR.R index 8346e5a..4f6aaa9 100644 --- a/tests/testthat/test-outstandR.R +++ b/tests/testthat/test-outstandR.R @@ -30,9 +30,9 @@ test_that("different combinations of covariates in formula", { strat_1 <- strategy_maic(formula = as.formula("y ~ trt*X1")) expect_length(outstandR(AC_IPD, BC_ALD, strategy = strat_1234), 3) - expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_31)) - expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_13)) - expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_1)) + # expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_31)) + # expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_13)) + # expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_1)) # stc expect_error(strategy_stc(formula = as.formula("y ~ 1")), @@ -46,8 +46,8 @@ test_that("different combinations of covariates in formula", { strat_13 <- strategy_stc(formula = as.formula("y ~ trt*X1 + X3")) strat_1 <- strategy_stc(formula = as.formula("y ~ trt*X1")) - expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_1234)) - expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_31)) - expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_13)) - expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_1)) + # expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_1234)) + # expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_31)) + # expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_13)) + # expect_equal(outstandR(AC_IPD, BC_ALD, strategy = strat_1)) }) diff --git a/tests/testthat/test-xxx_stats.R b/tests/testthat/test-xxx_stats.R index e2bc8f2..869736e 100644 --- a/tests/testthat/test-xxx_stats.R +++ b/tests/testthat/test-xxx_stats.R @@ -1,68 +1,12 @@ # unit tests for ALD_stats() test_that("ALD_stats() returns the correct values", { - # test 1 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(ALD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 2 - x <- c(1, 2, 3, 4, 5) - y <- c(5, 4, 3, 2, 1) - expect_equal(ALD_stats(x, y), c(4, 4, 4, 4, 4)) - # test 3 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 1, 1, 1, 1) - expect_equal(ALD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 4 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(ALD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 5 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(ALD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 6 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(ALD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 7 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(ALD_stats(x, y), c(0, 0, 0, 0, 0)) }) # unit tests for IPD_stats() test_that("IPD_stats() returns the correct values", { - # test 1 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(IPD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 2 - x <- c(1, 2, 3, 4, 5) - y <- c(5, 4, 3, 2, 1) - expect_equal(IPD_stats(x, y), c(4, 4, 4, 4, 4)) - # test 3 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 1, 1, 1, 1) - expect_equal(IPD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 4 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(IPD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 5 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(IPD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 6 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(IPD_stats(x, y), c(0, 0, 0, 0, 0)) - # test 7 - x <- c(1, 2, 3, 4, 5) - y <- c(1, 2, 3, 4, 5) - expect_equal(IPD_stats(x, y), c(0, 0, 0, 0, 0)) })