diff --git a/tests/testthat/test-admix1.R b/tests/testthat/test-admix1.R index fd39abd..f4560b0 100644 --- a/tests/testthat/test-admix1.R +++ b/tests/testthat/test-admix1.R @@ -175,5 +175,8 @@ test_that("etsiParas works like on Matlab", { test_that("computePersonalAllFreqs works like on Matlab", { expect_equal(computePersonalAllFreqs(1, 1:4, c(15, 5, 10, 40), 1), 15) - # TODO: test with 2x2 matrix + mx <- matrix(c(15, 10, 5, 40), 2) + expect_equal(computePersonalAllFreqs(1, 1:4, mx, 1), c(15, 40)) + expect_equal(computePersonalAllFreqs(1, 1:3, mx, 1), c(15, 40)) + expect_equal(computePersonalAllFreqs(1, 1:2, mx, 1), c(15, 40)) }) \ No newline at end of file