tests/testthat/test-layouts.R

test_that("igraph function calls work", {
  g <- igraph::make_full_graph(10,FALSE)
  igraph::V(g)$lvl <- rep(c(1,2),each = 5)
  expect_no_error(layout_igraph_centrality(g,cent = igraph::degree(g)))
  expect_no_error(layout_igraph_constrained_stress(g,fixdim="x",coord=rep(1,10)))
  expect_no_error(layout_igraph_eigen(g))
  expect_no_error(layout_igraph_focus(g,v = 1))
  expect_no_error(layout_igraph_multilevel(g))
  expect_no_error(layout_igraph_pmds(g,pivots = 5))
  expect_no_error(layout_igraph_sparse_stress(g,pivots = 5))
  expect_no_error(layout_igraph_stress(g))
  expect_no_error(layout_igraph_backbone(g))
})

Try the graphlayouts package in your browser

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

graphlayouts documentation built on Nov. 4, 2023, 1:08 a.m.