tests/testthat/test-vartrack_samplesize_prev.R

test_that("vartrack_samplesize_prev input arguments are valid", {

    expect_error(vartrack_samplesize_prev(p_v1 = 0.1, prob = 0.9, precision = 0.1, omega = 0.9, c_ratio = 1.5, sampling_freq = "fake"),
        "sampling frequency argument")
    expect_error(vartrack_samplesize_prev(p_v1 = 0.1, omega = 0.9, c_ratio = 1.5, sampling_freq = "cont"),
        "not yet implemented")
})

test_that("vartrack_samplesize_prev return object is valid double", {

    expect_type(vartrack_samplesize_prev(p_v1 = 0.1, prob = 0.9, omega = 0.9, precision = 0.1, c_ratio = 1.5, sampling_freq = "xsect"), "double")
})
HopkinsIDD/phylosamp documentation built on May 28, 2023, 3:21 a.m.