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-devel/oro.nifti documentation built on May 6, 2021, 1:49 p.m.