Commit 1c7e9d80 authored by Mathieu Giraud's avatar Mathieu Giraud

tests/testRepresentative.cpp: update unit tests

parent 176dd42f
......@@ -15,26 +15,26 @@ void testRepresentative() {
Sequence representative = krc.getRepresentative();
// Seq3 is the longest it should be taken when performing 0 extra iteration
TAP_TEST(representative.label.find("seq3-[37,73]") == 0, TEST_KMER_REPRESENTATIVE,
TAP_TEST(representative.label.find("representative--seq3-[37,73]") == 0, TEST_KMER_REPRESENTATIVE,
"If we take the first representative we should have seq3, and not at the beginning (" << representative.label << " instead)");
krc.setStabilityLimit(1);
krc.compute();
representative = krc.getRepresentative();
TAP_TEST(representative.label.find("seq3-[37,73]") == 0, TEST_KMER_REPRESENTATIVE,
TAP_TEST(representative.label.find("representative--seq3-[37,73]") == 0, TEST_KMER_REPRESENTATIVE,
"When allowing one step before stability, we should still have seq3 (" << representative.label << " instead)");
krc.setStabilityLimit(2);
krc.compute();
representative = krc.getRepresentative();
TAP_TEST(representative.label.find("seq1-[0,41]") == 0, TEST_KMER_REPRESENTATIVE,
TAP_TEST(representative.label.find("representative--seq1-[0,41]") == 0, TEST_KMER_REPRESENTATIVE,
"When allowing two steps before stability, we should reach seq1 (" << representative.label << " instead)");
krc.setRevcomp(true);
krc.setRequiredSequence("ATCGCGCCCT"); // revcomp
krc.compute();
representative = krc.getRepresentative();
TAP_TEST(representative.label.find("seq2-[33,52]") == 0, TEST_KMER_REPRESENTATIVE_REQUIRED_SEQ,
TAP_TEST(representative.label.find("representative--seq2-[33,52]") == 0, TEST_KMER_REPRESENTATIVE_REQUIRED_SEQ,
"When requiring sequence ATCGCGCCCT, we should have seq2 (" << representative.label << " instead)");
krc.setRevcomp(false);
......
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