Commit a39f9bbf authored by Mikaël Salson's avatar Mikaël Salson
Browse files

Merge branch 'feature-a/3303-correct-testgetmultiresults' into 'dev'

Fix testGetMultiResults when there is only unknown K-mer

See merge request !222
parents d1c69bd3 6cdfb5ac
Pipeline #30041 canceled with stages
in 6 minutes and 42 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;
for(auto const& x : results){
if(x.first.toStringValues() == AFFECT_UNKNOWN_TO_STRING){
break;
}
++i;
}
TAP_TEST(i < results.size(), TEST_AC_OCCURENCES, "Ambiguous Kmer not found");
/*
If there is K-mers in automaton doesn't match the sequence, the map must
return only unknown K-mers.
*/
pair<KmerAffect, int> singleResult = *(results.begin());
KmerAffect unknownKmerAffect = singleResult.first;
TAP_TEST_EQUAL(unknownKmerAffect, AFFECT_UNKNOWN, TEST_AC_OCCURENCES, "Unknown 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