Fixed bug involving scalar parsing

This commit is contained in:
Waldir Leoncio 2020-01-30 16:20:52 +01:00
parent 2e8ad9a89d
commit 9580a48a63
2 changed files with 16 additions and 3 deletions

View file

@ -183,9 +183,11 @@ test_that("computePersonalAllFreqs works like on Matlab", {
test_that("simuloiAlleeli works like on Matlab", {
# TODO: test on vector
sk1 <- 2
ra1 <- array(1:12, c(2, 2, 3))
mx1 <- matrix(c(3, 5, 0, 9), 2)
mx2 <- matrix(c(3, 5, 0, 9, 5, 8), 2)
expect_equal(simuloiAlleeli(sk1, 1, 1), 1)
expect_equal(simuloiAlleeli(ra1, 2, 1), 1)
expect_equal(simuloiAlleeli(mx1, 1, 2), 2)
expect_equal(simuloiAlleeli(mx2, 1, 3), 1)