Commit 633e4e83 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

tests: following previous commit, remove 'kmer' unused argument

parent 15866913
......@@ -20,26 +20,26 @@ void testAffectAnalyser1() {
for (int i = 2; i < nb_seq-1; i++) {
// i starts at 2 because AAAA is not found: there is an ambiguity with
// AAAA coming from AAAACAAAACAAAAC or AAAAAAAAAAAAAAA
KAffect current_affect("", seq[2*i+1], 1);
KAffect current_affect(seq[2*i+1], 1);
TAP_TEST(kaa.count(current_affect) == 0, TEST_AA_COUNT, "");
TAP_TEST(ckaa.count(current_affect) == 0, TEST_COUNT_AA_COUNT, ckaa.count(current_affect));
TAP_TEST(kaa.first(current_affect) == (int)string::npos, TEST_AA_FIRST, "");
TAP_TEST(kaa.last(current_affect) == (int)string::npos, TEST_AA_LAST, "");
}
for (int i = 0; i < 2; i++) {
KAffect current_affect("", seq[2*i+1], 1);
KAffect current_affect(seq[2*i+1], 1);
TAP_TEST(kaa.count(current_affect) == 2, TEST_AA_COUNT, kaa.count(current_affect));
TAP_TEST(ckaa.count(current_affect) == 2, TEST_COUNT_AA_COUNT, ckaa.count(current_affect));
TAP_TEST(kaa.getAffectation(kaa.first(current_affect)) == current_affect, TEST_AA_GET_AFFECT, "");
TAP_TEST(kaa.getAffectation(kaa.last(current_affect)) == current_affect, TEST_AA_GET_AFFECT, "");
}
TAP_TEST(kaa.count(KAffect("", seq[2*(nb_seq-1)+1], 1)) == 1, TEST_AA_COUNT, "");
TAP_TEST((kaa.first(KAffect("", seq[2*(nb_seq-1)+1], 1))
== kaa.last(KAffect("", seq[2*(nb_seq-1)+1], 1)))
TAP_TEST(kaa.count(KAffect(seq[2*(nb_seq-1)+1], 1)) == 1, TEST_AA_COUNT, "");
TAP_TEST((kaa.first(KAffect(seq[2*(nb_seq-1)+1], 1))
== kaa.last(KAffect(seq[2*(nb_seq-1)+1], 1)))
== 1, TEST_AA_FIRST, "");
TAP_TEST(ckaa.max(forbidden) == KAffect("", "C lots of", 1)
|| ckaa.max(forbidden) == KAffect("", "G lots of", 1),
TAP_TEST(ckaa.max(forbidden) == KAffect("C lots of", 1)
|| ckaa.max(forbidden) == KAffect("G lots of", 1),
TEST_COUNT_AA_MAX, "max is " << ckaa.max(forbidden));
TAP_TEST(ckaa.max() == KAffect::getUnknown(),
......@@ -51,8 +51,8 @@ void testAffectAnalyser1() {
TAP_TEST(kaa.getDistinctAffectations().size() == 5, TEST_AA_GET_DISTINCT_AFFECT, "");
KAffect cAffect = KAffect("", seq[1], 1);
KAffect gAffect = KAffect("", seq[3], 1);
KAffect cAffect = KAffect(seq[1], 1);
KAffect gAffect = KAffect(seq[3], 1);
TAP_TEST(ckaa.countBefore(cAffect, 4) == 0, TEST_COUNT_AA_COUNT_BEFORE, "");
TAP_TEST(ckaa.countBefore(cAffect, 5) == 1, TEST_COUNT_AA_COUNT_BEFORE, "");
TAP_TEST(ckaa.countAfter(cAffect, 4) == 1, TEST_COUNT_AA_COUNT_AFTER, "");
......@@ -77,8 +77,8 @@ void testAffectAnalyser1() {
TAP_TEST(ckaa.lastMax(cAffect, gAffect) == 8, TEST_COUNT_AA_LAST_MAX, ckaa.lastMax(cAffect, gAffect));
// Test affectation with two affects that are not in the sequence
KAffect aAffect = KAffect("", seq[5], 1);
KAffect tAffect = KAffect("", seq[7], 1);
KAffect aAffect = KAffect(seq[5], 1);
KAffect tAffect = KAffect(seq[7], 1);
TAP_TEST(ckaa.firstMax(aAffect, tAffect) == -1, TEST_COUNT_AA_FIRST_MAX, "");
TAP_TEST(ckaa.lastMax(aAffect, tAffect) == - 1,
TEST_COUNT_AA_LAST_MAX, "");
......@@ -109,7 +109,7 @@ void testAffectAnalyser2() {
forbidden.insert(KAffect::getAmbiguous());
forbidden.insert(KAffect::getUnknown());
TAP_TEST(kaa.getAffectation(1) == KAffect("", seq[2*(nb_seq-1)+1], -1), TEST_AA_GET_AFFECT, "");
TAP_TEST(kaa.getAffectation(1) == KAffect(seq[2*(nb_seq-1)+1], -1), TEST_AA_GET_AFFECT, "");
TAP_TEST(kaa.count(kaa.getAffectation(1)) == 1, TEST_AA_GET_AFFECT, "");
TAP_TEST(ckaa.count(kaa.getAffectation(1)) == 1, TEST_COUNT_AA_COUNT, "");
TAP_TEST(kaa.getAffectation(0) == kaa.getAffectation(10 - k), TEST_AA_GET_AFFECT, "");
......@@ -120,7 +120,7 @@ void testAffectAnalyser2() {
TAP_TEST(kaa.getDistinctAffectations().size() == 3, TEST_AA_GET_DISTINCT_AFFECT, "");
TAP_TEST(ckaa.max(forbidden) == KAffect("", seq[2*(nb_seq-1)+1], -1),
TAP_TEST(ckaa.max(forbidden) == KAffect(seq[2*(nb_seq-1)+1], -1),
TEST_COUNT_AA_MAX, "max is " << ckaa.max(forbidden));
TAP_TEST(ckaa.max() == KAffect::getUnknown(),
......
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