tests/testthat/test_sizeof_hdr.R

context("sizeof_hdr attribute")

suppressWarnings({
  aim <- readANALYZE(system.file("anlz/avg152T1.hdr.gz", 
                                 package = "oro.nifti"))
})
nim <- readNIfTI(system.file("nifti/mniRL.nii.gz", package = "oro.nifti"))

test_that("sizeof_hdr()", {
  expect_equal(sizeof_hdr(aim), 348)
  expect_equal(sizeof_hdr(nim), 348)
})

test_that("sizeof.hdr()", {
  expect_equal(sizeof.hdr(aim), 348)
  expect_equal(sizeof.hdr(nim), 348)
})


test_that("sizeof_hdr()", {
  expect_silent({
    sizeof_hdr(aim) = 348
    })
  expect_silent({
    sizeof_hdr(nim) = 348
  })
})
neuroconductor-releases/oro.nifti documentation built on Jan. 1, 2021, 11:40 a.m.