inst/tests/test_plate-map.R

library(testthat)
context("Testing the plate-mapping content of the OPM package for consistency")


if (!exists("TEST.DIR"))
  attach(objects_for_testing())


################################################################################


## PLATE_MAP
test_that("plate names agree", {
  mixed_names_and_values <- function(x) {
    diff <- setdiff(x, names(x))
    length(diff) >= length(x)
  }
  expect_false(mixed_names_and_values(PLATE_MAP))
  expect_equal(names(PLATE_MAP), colnames(WELL_MAP))
  # both should have been brought into the same order (usually alphabetical)
})

Try the opm package in your browser

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

opm documentation built on May 2, 2019, 6:08 p.m.