tests/testthat/test-spt.R

context("shortest path tree")

test_that("spt for igraph",{
    set.seed(123)
    g <- igraph::sample_gnp(100, 3/100)
    tr <- spt(g, 6, igraph::V(g))
    expect_true(inherits(tr, 'phylo'))
})
YuLab-SMU/treeio documentation built on May 15, 2024, 8:47 p.m.