tests/testthat/test-make_infrared_ineqmat.R

test_that("make_infrared_ineqmat works", {
  trichord_with_false_mat <- matrix(c(-1, 2, -1, 0,
                                      -3, 3, 0, -1,
                                      -1.5, 0, 1.5, -1,
                                      0, -3, 3, -1),
                                    byrow=TRUE, nrow=4)
  expect_equal(make_infrared_ineqmat(3, include_wraparound=FALSE), 
               trichord_with_false_mat)
  expect_snapshot(make_infrared_ineqmat(5, include_wraparound=TRUE))
  expect_snapshot(make_infrared_ineqmat(6, include_wraparound=FALSE))
})

Try the musicMCT package in your browser

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

musicMCT documentation built on June 21, 2026, 9:06 a.m.