Commit b872b04c authored by Cyprien Borée's avatar Cyprien Borée
Browse files

Fix testGetMultiResults when there is only unknown K-mer

The previous test was only looking for a single unknown K-mer in the map even
though the map shouldn't contain anything else from unknown K-mers.
Indeed when there is no K-mers in the automaton that match the input sequence,
then the map contains only unknown K-mers.
For more informations, see #3303.
parent 59aa4797
Pipeline #29922 passed with stages
in 28 minutes and 51 seconds
......@@ -110,16 +110,13 @@ void testGetMultiResults(){
seqtype seq4 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
results = aho.getMultiResults(seq4);
TAP_TEST(results.size() <= 1, TEST_AC_OCCURENCES, errorSize);
/* Check if there is at least one Kmer unknown when no matching K-mer */
unsigned int i = 0;
/*
If there is K-mers in automaton doesn't match the sequence, the map must
return only unknown K-mers.
*/
for(auto const& x : results){
if(x.first.toStringValues() == AFFECT_UNKNOWN_TO_STRING){
break;
}
++i;
TAP_TEST(x.first == AFFECT_UNKNOWN, TEST_AC_OCCURENCES, "Ambiguous Kmer not found");
}
TAP_TEST(i < results.size(), TEST_AC_OCCURENCES, "Ambiguous Kmer not found");
}
void testRCInsertAcAutomaton() {
......
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