From 98cff111283ea28ed8d9cab0d378df31739ab929 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Tue, 8 Feb 2022 11:17:23 +0100 Subject: [PATCH] Added unit test file for greedyPopMix functions (#2) --- tests/testthat/test-greedyPopMix.R | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/testthat/test-greedyPopMix.R diff --git a/tests/testthat/test-greedyPopMix.R b/tests/testthat/test-greedyPopMix.R new file mode 100644 index 0000000..a770d12 --- /dev/null +++ b/tests/testthat/test-greedyPopMix.R @@ -0,0 +1,11 @@ +context("greedyPopMix functions") + +test_that("Auxiliary functions work properly", { + x <- matrix(11:16, 3) + y <- matrix(2:7, 3) + z <- list( + popnames2 = matrix(c(11:13, seq(1.5, 2.5, 0.5)), 3), + rowsFromInd = 2 + ) + expect_equal(findOutRowsFromInd(x, y, "Diploid"), z) +})