inst/unitTests/test_SRList.R

test_SRList_construction <- function() {
    srl <- SRList()
    checkTrue(validObject(srl))
    checkEquals(0, length(srl))

    srl <- SRList(list())
    checkTrue(validObject(srl))
    checkEquals(0, length(srl))

    srl <- SRList(list(1))
    checkTrue(validObject(srl))
    checkEquals(1, length(srl))

    srl <- SRList(list(1, 2))
    checkTrue(validObject(srl))
    checkEquals(2, length(srl))
    checkEquals(1, length(srl[[1]]))

    srl <- SRList(1, 2)
    checkTrue(validObject(srl))
    checkEquals(2, length(srl))
    checkEquals(1, length(srl[[1]]))
}
Bioconductor/ShortRead documentation built on Nov. 2, 2024, 4:38 p.m.