From 40f2b3f07ad5c5416947bd96502b263ecba35d33 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Tue, 12 Apr 2022 15:47:22 +0200 Subject: [PATCH] Added test unit for handlePopData() --- tests/testthat/test-greedyPopMix.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/testthat/test-greedyPopMix.R b/tests/testthat/test-greedyPopMix.R index e3d79b2..5378a70 100644 --- a/tests/testthat/test-greedyPopMix.R +++ b/tests/testthat/test-greedyPopMix.R @@ -16,4 +16,14 @@ test_that("Auxiliary functions work properly", { distances = as.matrix(rep(0, 4950)) ) ) + x3 <- matrix(c(9, 4, 1, 8, 5, 2, 1, 2, 3), 3) + y3 <- list( + newData = matrix(c(3:1, 3:1, 1:3), 3), + rows = matrix(c(1:3, 1:3), 3), + alleleCodes = matrix(c(1, 4, 9, 2, 5, 8), 3), + noalle = c(3, 3), + adjprior = matrix(rep(3/9, 6), 3), + priorTerm = 5.9125 + ) + expect_equal(handlePopData(x3), y3) })