dwww Home | Show directory contents | Find package

context("Automatic layout")

test_that("layout_nicely() works with negative weights", {
    g <- make_graph("petersen")
    E(g)$weight <- -5:9
    expect_warning(layout_nicely(g), regexp = "ignoring all weights")
})

test_that("layout_nicely() does not recurse into itself", {
    g <- make_graph("petersen")
    g$layout <- layout_nicely
    expect_warning(layout_nicely(g), regexp = NA)   # should not recurse infinitely
})

Generated by dwww version 1.15 on Thu May 23 17:22:13 CEST 2024.