tests/testthat/testfllowls.R

library(pipenostics)

test_that("*flowls* errs in listing paths", {
  skip_on_cran()
  all_paths <- list(
    c(12, 13, 11, 8, 4, 1),  # hereinafter indexes of acceptor nodes
    c(12, 13, 11, 8, 4, 2),
    c(12, 13, 11, 8, 6, 5,  3),
    c(12, 13, 11, 8, 6, 7),
    c(12, 13, 11, 8, 6, 9),
    c(12, 13, 11, 10),
    c(12, 13, 14, 15),
    c(12, 13, 16, 17),
    c(12, 13, 16, 18, 20, 19),
    c(12, 13, 16, 18, 20, 21),
    c(12, 13, 16, 18, 22, 24),
    c(12, 13, 16, 18, 22, 25),
    c(12, 13, 16, 18, 20, 23, 26)
  )

  # find those paths:
  path <- with(m325testbench, {
     flowls(sender, acceptor)
  })

  for (i in union(seq_along(path), seq_along(all_paths)))
    expect_equal(
      path[[i]],
      all_paths[[i]]
    )
})

Try the pipenostics package in your browser

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

pipenostics documentation built on March 2, 2021, 5:06 p.m.