tests/tinytest.R

if (requireNamespace("tinytest", quietly=TRUE)) {

    ## Set a seed to make the test deterministic
    set.seed(42)

    ## there are several more granular ways to test files in a
    ## tinytest directory, see its package vignette; tests can also
    ## run once the package is installed using the same command

    ## we need version 0.9.3 or later
    if (packageVersion("tinytest") >= "0.9.3") {
        tinytest::test_package("RcppAnnoy")
    }
}

Try the RcppAnnoy package in your browser

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

RcppAnnoy documentation built on June 22, 2024, 7:04 p.m.