tests/testthat/test-templatebrain.R

test_that("templatebrain works", {
  expect_is(IS2 <- templatebrain("IS2", dims=c(30,40,50), note="Test field"),
            'templatebrain')
  expect_null(IS2$origin)

  expect_equal(as.templatebrain(IS2), IS2)

  expect_error(as.templatebrain("rhubarb.nrrd"))
  expect_equal(origin(IS2), c(0,0,0))
})

Try the nat.templatebrains package in your browser

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

nat.templatebrains documentation built on July 9, 2023, 6:18 p.m.