Commit 5856abdb authored by Mikaël Salson's avatar Mikaël Salson

Tests: test getAllAffectations() in AffectAnalyser

parent 413c4169
......@@ -126,6 +126,15 @@ void testAffectAnalyser2() {
TAP_TEST(ckaa.max() == KAffect::getUnknown(),
TEST_COUNT_AA_MAX, "max is " << ckaa.max());
for (int i = 0; i < 10 - k; i++)
TAP_TEST(kaa.getAffectation(i) == kaa.getAllAffectations(AO_NONE)[i], TEST_AA_GET_ALL_AO_NONE, "");
TAP_TEST(kaa.getAffectation(0) == kaa.getAllAffectations(AO_NO_CONSECUTIVE)[0], TEST_AA_GET_ALL_AO_NO_CONSECUTIVE, "");
TAP_TEST(kaa.getAllAffectations(AO_NO_CONSECUTIVE).size() == 4, TEST_AA_GET_ALL_AO_NO_CONSECUTIVE, "size = " << kaa.getAllAffectations(AO_NO_CONSECUTIVE).size());
TAP_TEST(kaa.getAffectation(1) == kaa.getAllAffectations(AO_NO_CONSECUTIVE)[1], TEST_AA_GET_ALL_AO_NO_CONSECUTIVE, "actual: " << kaa.getAllAffectations(AO_NO_CONSECUTIVE)[1] << ", expected: " << kaa.getAffectation(1));
TAP_TEST(kaa.getAffectation(2) == kaa.getAllAffectations(AO_NO_CONSECUTIVE)[2], TEST_AA_GET_ALL_AO_NO_CONSECUTIVE, kaa.getAllAffectations(AO_NO_CONSECUTIVE)[2] << ", expected: " << kaa.getAffectation(2));
TAP_TEST(kaa.getAllAffectations(AO_NO_CONSECUTIVE)[3] == kaa.getAffectation(10-k), TEST_AA_GET_ALL_AO_NO_CONSECUTIVE, kaa.getAllAffectations(AO_NO_CONSECUTIVE)[3] << ", expected: " << kaa.getAffectation(10-k));
delete index;
}
......
......@@ -33,6 +33,8 @@ enum {
TEST_AA_FIRST,
TEST_AA_LAST,
TEST_AA_PREDICATES,
TEST_AA_GET_ALL_AO_NONE,
TEST_AA_GET_ALL_AO_NO_CONSECUTIVE,
TEST_AA_REVCOMP_LABEL,
TEST_AA_REVCOMP_STRAND,
TEST_AA_GET_MAXIMUM_MAX_FOUND,
......@@ -123,6 +125,8 @@ inline void declare_tests() {
RECORD_TAP_TEST(TEST_AA_FIRST, "AffectAnalyser.first()");
RECORD_TAP_TEST(TEST_AA_LAST, "AffectAnalyser.last()");
RECORD_TAP_TEST(TEST_AA_PREDICATES, "AffectAnalyser: isUnknown() isAmbiguous()");
RECORD_TAP_TEST(TEST_AA_GET_ALL_AO_NONE, "AffectAnalyser: getAllAffectations() with AO_NONE");
RECORD_TAP_TEST(TEST_AA_GET_ALL_AO_NO_CONSECUTIVE, "AffectAnalyser: getAllAffectations() with AO_NO_CONSECUTIVE");
RECORD_TAP_TEST(TEST_AA_REVCOMP_LABEL, "AffectAnalyser: check that label is the same on revcomp sequence");
RECORD_TAP_TEST(TEST_AA_REVCOMP_STRAND, "AffectAnalyser: check that strand is opposite on revcomp sequence");
RECORD_TAP_TEST(TEST_AA_GET_MAXIMUM_MAX_FOUND, "KmerAffectAnalyser: getMaximum() function, max_found value");
......
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