tests/testthat/test_zero_loop.R

context("Zero-length loop")

test_that("only one zero-length loop is allowed", {
  expect_equal(length(pqsfinder(DNAString("GGTGGGGGG"), min_score = 26)), 0)
  expect_equal(length(pqsfinder(DNAString("GGGGTGGGG"), min_score = 26)), 0)
  expect_equal(length(pqsfinder(DNAString("GGGGGGTGG"), min_score = 26)), 0)
  expect_equal(length(pqsfinder(DNAString("GGTGGTGGGG"), min_score = 26)), 1)
  expect_equal(length(pqsfinder(DNAString("GGTGGGGTGG"), min_score = 26)), 1)
  expect_equal(length(pqsfinder(DNAString("GGGGTGGTGG"), min_score = 26)), 1)
})

Try the pqsfinder package in your browser

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

pqsfinder documentation built on Nov. 8, 2020, 5:52 p.m.