tests/testthat/test-utils.R

testthat::test_that("Test that weights and adjacency generics work as expected", {

    temp <- list(weights=1, adj=1)
    class(temp) <- "rwclust"

    expect_equal(weights(temp), 1)
    expect_equal(adjacency(temp), 1)

})

Try the Rwclust package in your browser

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

Rwclust documentation built on July 25, 2022, 1:05 a.m.