Commit ff80c5a8 authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud
Browse files

unit-tests: Test BinReadStorage::getBestReads()

parent 791f0f20
......@@ -92,8 +92,19 @@ void testBinReadStorage() {
TAP_TEST(it->sequence == "AGAGACAGTA", TEST_BRS_GET_READS, "");
it++;
TAP_TEST(it->sequence == "AATAAGAGTGAGACAGTA", TEST_BRS_GET_READS, "");
TAP_TEST(sequences.size() == 3, TEST_BRS_GET_READS, "");
sequences = reads.getBestReads(1);
TAP_TEST(sequences.begin()->sequence == "AATAAGAGTGAGACAGTA", TEST_BRS_GET_BEST_READS, "");
sequences = reads.getBestReads(3);
TAP_TEST(sequences.size() == 3, TEST_BRS_GET_BEST_READS, "");
sequences = reads.getBestReads(3, 15);
TAP_TEST(sequences.size() == 1, TEST_BRS_GET_BEST_READS, "");
TAP_TEST(sequences.begin()->sequence == "AATAAGAGTGAGACAGTA", TEST_BRS_GET_BEST_READS, "");
delete scorer;
}
......
......@@ -151,6 +151,7 @@ enum {
TEST_BRS_GET_SCORE,
TEST_BRS_GET_AVG_SCORE,
TEST_BRS_GET_NB_SCORES,
TEST_BRS_GET_BEST_READS,
/* Bugs */
TEST_BUG_SEGMENTATION,
......@@ -293,6 +294,7 @@ inline void declare_tests() {
RECORD_TAP_TEST(TEST_BRS_GET_SCORE, "Test BinReadStorage::getScore()");
RECORD_TAP_TEST(TEST_BRS_GET_AVG_SCORE, "Test BinReadStorage::getAverageScore()");
RECORD_TAP_TEST(TEST_BRS_GET_NB_SCORES, "Test BinReadStorage::getNbScores()");
RECORD_TAP_TEST(TEST_BRS_GET_BEST_READS, "Test the getBestReads() method in ReadStorage");
RECORD_TAP_TEST(TEST_KMER_REPRESENTATIVE, "Test KmerRepresentativeComputer computations");
RECORD_TAP_TEST(TEST_KMER_REPRESENTATIVE_REQUIRED_SEQ, "Test KmerRepresentativeComputer computations with a required sequence");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment