File: test-utils-assert-args.R

package info (click to toggle)
r-cran-igraph 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 27,772 kB
  • sloc: ansic: 206,420; cpp: 21,827; fortran: 4,090; yacc: 1,229; lex: 518; sh: 52; makefile: 8
file content (14 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
test_that("ensure_igraph() works", {
  expect_snapshot_error(ensure_igraph(1))
  expect_snapshot_error(ensure_igraph(NA))
  expect_snapshot_error(ensure_igraph(NULL))
  expect_silent(ensure_igraph(make_empty_graph()))
  expect_silent(ensure_igraph(NULL, optional = TRUE))
})

test_that("igraph.match.arg() works", {
  expect_snapshot(
    cluster_leiden(make_graph("Zachary"), objective_function = "something"),
    error = TRUE
  )
})