tests/testthat/test-input-failure.R

context("input arguments")

test_that("dreval fails if the wrong arguments are provided", {
    data(pbmc3ksub)
    expect_error(dreval(1))
    expect_error(dreval(pbmc3ksub, dimReds = "missing"))
    expect_error(dreval(pbmc3ksub, refType = "missing"))
    expect_error(dreval(pbmc3ksub, refType = "assay", refAssay = "missing"))
    expect_error(dreval(pbmc3ksub, refType = "dimred", refDimRed = "missing"))
    expect_error(dreval(pbmc3ksub, features = "missing"))
    expect_error(dreval(pbmc3ksub, nSamples = 0))
    expect_error(dreval(pbmc3ksub, distNorm = TRUE))
    expect_error(dreval(pbmc3ksub, refDistMethod = "missing"))
    expect_error(dreval(pbmc3ksub, kTM = "1"))
    expect_error(dreval(pbmc3ksub, labelColumn = "missing"))
    expect_error(dreval(pbmc3ksub, labelColumn = "Barcode"))
    expect_error(dreval(pbmc3ksub, labelColumn = "Barcode_type"))
    expect_error(dreval(pbmc3ksub, verbose = "TRUE"))
})
csoneson/dreval documentation built on July 16, 2024, 11:41 a.m.