Commit 342217c4 authored by Carsten Kemena's avatar Carsten Kemena

added test

parent 8f7be3f1
Pipeline #657 passed with stages
in 2 minutes and 59 seconds
......@@ -204,6 +204,42 @@ BOOST_AUTO_TEST_CASE(Collapse_check)
BOOST_CHECK_EQUAL(da3[1].accession(), "PF00008");
BOOST_CHECK_EQUAL(da3.size(), 4);
BOOST_CHECK_EQUAL(da3.str(), "PF00007-PF00008-PF00009-PF00010");
da.clear();
da.emplace_back("A", 1, 40, 0.4, BioSeqDataLib::DomainDB::pfam);
da.emplace_back("A", 100, 101, 0.4, BioSeqDataLib::DomainDB::pfam);
da.emplace_back("C", 1000, 3000, 0.4, BioSeqDataLib::DomainDB::pfam);
da.collapse(true);
BOOST_CHECK_EQUAL(da.size(), 2);
BOOST_CHECK_EQUAL(da[0].accession(), "A");
BOOST_CHECK_EQUAL(da[1].accession(), "C");
BOOST_CHECK_EQUAL(da.str(), "A-C");
da2.clear();
da2.emplace_back("PF00007", 1, 40, 0.4, BioSeqDataLib::DomainDB::pfam);
da2.emplace_back("PF00008", 100, 101, 0.4, BioSeqDataLib::DomainDB::pfam);
da2.emplace_back("PF00009", 1000, 3000, 0.4, BioSeqDataLib::DomainDB::pfam);
da2.emplace_back("PF00010", 10000, 30000, 0.4, BioSeqDataLib::DomainDB::pfam);
da2.collapse(true);
BOOST_CHECK_EQUAL(da2[1].accession(), "PF00008");
BOOST_CHECK_EQUAL(da2.size(), 4);
BOOST_CHECK_EQUAL(da2.str(), "PF00007-PF00008-PF00009-PF00010");
da3.clear();
da3.emplace_back("PF00007", 1, 40, 0.4, BioSeqDataLib::DomainDB::pfam);
da3.emplace_back("PF00008", 100, 101, 0.4, BioSeqDataLib::DomainDB::pfam);
da3.emplace_back("PF00008", 102, 104, 0.4, BioSeqDataLib::DomainDB::pfam);
da3.emplace_back("PF00009", 1000, 3000, 0.4, BioSeqDataLib::DomainDB::pfam);
da3.emplace_back("PF00010", 10000, 30000, 0.4, BioSeqDataLib::DomainDB::pfam);
da3.emplace_back("PF00010", 300000, 3000000, 0.4, BioSeqDataLib::DomainDB::pfam);
BOOST_CHECK_EQUAL(da3.size(), 6);
da3.collapse(true);
BOOST_CHECK_EQUAL(da3[1].accession(), "PF00008");
BOOST_CHECK_EQUAL(da3.size(), 4);
BOOST_CHECK_EQUAL(da3.str(), "PF00007-PF00008-PF00009-PF00010");
}
......
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