From 7e7a997ba9a09fd8b7f892b6b130b7da9f3c56fe Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Thu, 30 Jan 2020 13:19:43 +0100 Subject: [PATCH] Added more tests --- tests/testthat/test-admix1.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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