Added unit tests for greedyMix() on GenePop (#24)

This commit is contained in:
Waldir Leoncio 2024-08-26 13:26:52 +02:00
parent 12884cfcb6
commit 54b0b081ea

View file

@ -66,8 +66,10 @@ test_that("greedyMix() fails successfully", {
test_that("greedyMix() works when it should", { test_that("greedyMix() works when it should", {
baps_file <- file.path(path_inst, "BAPS_clustering_diploid.txt") baps_file <- file.path(path_inst, "BAPS_clustering_diploid.txt")
genepop_file <- file.path(path_inst, "GenePop.txt")
fasta_file <- file.path(path_inst, "FASTA_clustering_haploid.fasta") fasta_file <- file.path(path_inst, "FASTA_clustering_haploid.fasta")
greedy_baps <- greedyMix(baps_file, "BAPS") greedy_baps <- greedyMix(baps_file, "BAPS")
greedy_genepop <- greedyMix(genepop_file, "GenePop") # FIXME: doesn't match MATLAB output
expect_type(greedy_baps, "list") expect_type(greedy_baps, "list")
expect_length(greedy_baps, 10L) expect_length(greedy_baps, 10L)
}) })