Commit cc31689a authored by Carsten Kemena's avatar Carsten Kemena

Merge branch 'develop-ck' into 'master'

[SequenceSet] added emplace_back method

See merge request !17
parents cada6232 1ee5c36f
Pipeline #637 passed with stages
in 3 minutes and 6 seconds
......@@ -251,19 +251,16 @@ public:
sequences_.push_back(std::forward<T>(seq));
}
/**
* \brief Appends a sequence to the set.
* @param seq The sequence to add.
* \tparam SequenceType.
* \details Supports rvalue.
*//*
template<typename T>
*/
template<typename ... Args>
void
push_back(T *seq)
emplace_back(Args&&... args)
{
sequences_.push_back(SequencePtr(seq));
}*/
sequences_.emplace_back(std::forward<Args>(args)...);
}
/**
......
......@@ -33,6 +33,16 @@
BOOST_AUTO_TEST_SUITE(SequenceSet_Test)
BOOST_AUTO_TEST_CASE( SequenceSet_simple_Test)
{
BioSeqDataLib::SequenceSet<BioSeqDataLib::Sequence<> > set;
set.emplace_back("seq1", "ACGTTTT", "", "");
BOOST_CHECK_EQUAL(set[0].name(), "seq1");
BOOST_CHECK_EQUAL(set[0].seq(), "ACGTTTT");
}
BOOST_AUTO_TEST_CASE( Sequence_read_Test)
{
// test fasta reading
......
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