tests/testthat/test-read_fs_weight.R

# More tests are in test-write_fs_weight

test_that("Invalid arguments to read.fs.weight lead to errors", {
  tmp_file = tempfile(fileext=".w");

  expect_error(read.fs.weight(tmp_file, format = "no such format")); # invalid format
})

Try the freesurferformats package in your browser

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

freesurferformats documentation built on May 29, 2024, 5:29 a.m.