Commit 2063ba19 authored by Mathieu Giraud's avatar Mathieu Giraud

tests: testing KmerAffect copy constructor, with reverse

parent f9c9f33b
......@@ -66,6 +66,13 @@ void testKmerAffectClass() {
TAP_TEST(KAVm.affect == Vminus, TEST_KMERAFFECT_CONSTRUCTOR, "");
TAP_TEST(KAJp.affect == Jplus, TEST_KMERAFFECT_CONSTRUCTOR, "");
KmerAffect copy1(KAVp, false);
KmerAffect copy2(KAVp, true);
TAP_TEST(copy1.getLabel() == KAVp.getLabel(), TEST_KMERAFFECT_CONSTRUCTOR_COPY_REVERSE, "");
TAP_TEST(copy2.getLabel() == KAVp.getLabel(), TEST_KMERAFFECT_CONSTRUCTOR_COPY_REVERSE, "");
TAP_TEST(copy1.getStrand() == KAVp.getStrand(), TEST_KMERAFFECT_CONSTRUCTOR_COPY_REVERSE, "");
TAP_TEST(copy2.getStrand() == -KAVp.getStrand(), TEST_KMERAFFECT_CONSTRUCTOR_COPY_REVERSE, "");
KmerAffect test = KAVp;
TAP_TEST(test.affect == KAVp.affect, TEST_KMERAFFECT_AFFECTATION, "");
test += KAVp;
......
......@@ -41,6 +41,7 @@ enum {
TEST_AFFECT_TO_STRING,
TEST_AFFECT_OUT,
TEST_KMERAFFECT_CONSTRUCTOR,
TEST_KMERAFFECT_CONSTRUCTOR_COPY_REVERSE,
TEST_KMERAFFECT_AFFECTATION,
TEST_KMERAFFECT_ADD,
TEST_KMERAFFECT_UNKNOWN,
......@@ -159,6 +160,7 @@ inline void declare_tests() {
RECORD_TAP_TEST(TEST_AFFECT_TO_STRING, "toString() for affect_t");
RECORD_TAP_TEST(TEST_AFFECT_OUT, "operator<< for affect_t");
RECORD_TAP_TEST(TEST_KMERAFFECT_CONSTRUCTOR, "KmerAffect constructor");
RECORD_TAP_TEST(TEST_KMERAFFECT_CONSTRUCTOR_COPY_REVERSE, "KmerAffect constructor, with copy and reverse");
RECORD_TAP_TEST(TEST_KMERAFFECT_AFFECTATION, "KmerAffect operator=");
RECORD_TAP_TEST(TEST_KMERAFFECT_ADD, "KmerAffect operator +=");
RECORD_TAP_TEST(TEST_KMERAFFECT_UNKNOWN, "KmerAffect::isUnknown()");
......
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