tests/testthat/test-0-11-m4-spec.R

testthat::test_that("M4 specification preserves the M3 architecture", {
  s <- multimodal_m4_spec()
  testthat::expect_s3_class(s, "eye_multimodal_m4_spec")
  testthat::expect_s3_class(s, "eye_multimodal_m3_spec")
  testthat::expect_identical(s$model, "M4")
  testthat::expect_identical(s$n_states, 2L)
  k1 <- multimodal_m4_spec(n_states = 1L, trait_conditioning = character())
  testthat::expect_true(k1$state_null)
  testthat::expect_error(multimodal_m4_spec(n_states = 5L), "1 through 4")
  testthat::expect_error(multimodal_m4_spec(n_states = 2L, state_channels = c("gaze", "pupil")), "requires `rt`")
})

Try the eyeprocess package in your browser

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

eyeprocess documentation built on Sept. 28, 2026, 5:08 p.m.