tests/testthat/test_FindH.R

library(ADPclust)
context("Test FindH function")

test_that("FindH output", {
    p = 10
    n = 5
    a <- FindH(p, n, htype = 'amise')
    expect_is(a, 'numeric')
    expect_equal(length(a), 1)
    a <- FindH(p, n, htype = 'AmIsE')
    expect_is(a, 'numeric')
    expect_equal(length(a), 1)            
    a <- FindH(p, n, htype = 'ROT')
    expect_is(a, 'numeric')
    expect_equal(length(a), 1)
    a <- FindH(p, n, htype = 'rot')
    expect_is(a, 'numeric')
    expect_equal(length(a), 1)    
})

test_that("FindFD input", {
    expect_error(ADPclust::FindH('abc', 4, 'amise'))    
    expect_error(ADPclust::FindH(10, 5, 'amisse'))    
})

Try the ADPclust package in your browser

Any scripts or data that you put into this service are public.

ADPclust documentation built on May 2, 2019, 9:23 a.m.