tests/AAAtest-all.R

if (base::require("testthat", quietly = TRUE)) {
    pkg   <- "lme4"
    require(pkg, character.only=TRUE, quietly=TRUE)
    if(getRversion() < "3.5.0") { withAutoprint <- identity ; prt <- print } else { prt <- identity }
    if(Sys.getenv("USER") %in% c("maechler", "bbolker")) withAutoprint({
        ## for developers' sake:
        lP <- .libPaths() # ---- .libPaths() : ----
        prt(lP)
        ## ---- Entries in .libPaths()[1] : ----
        prt(list.files(lP[1], include.dirs=TRUE))
        prt(sessionInfo())
        prt(packageDescription("Matrix"))
        ## 'lme4' from packageDescription "file" :
        prt(attr(packageDescription("lme4"), "file"))
    })
    test_check(pkg)
    ##======== ^^^
    print(warnings()) # TODO? catch most of these by expect_warning(..)
} else {
    cat( "package 'testthat' not available, cannot run unit tests\n" )
}
lme4/lme4 documentation built on April 24, 2024, 5:51 p.m.