tests/testthat/test-stats_type_switch.R

# switch for stats type works ------------------------------------------

test_that(
  desc = "switch for stats type works",
  code = {
    skip_if(getRversion() < "3.6")

    expect_identical(stats_type_switch("p"), "parametric")
    expect_identical(stats_type_switch("pearson"), "parametric")
    expect_identical(stats_type_switch("non-parametric"), "nonparametric")
    expect_identical(stats_type_switch("np"), "nonparametric")
    expect_identical(stats_type_switch("r"), "robust")
    expect_identical(stats_type_switch("bf"), "bayes")
    expect_identical(stats_type_switch("xxx"), "parametric")
  }
)
IndrajeetPatil/ipmisc documentation built on Oct. 22, 2021, 6:36 a.m.