+// when we do a subsequence (or something that calls copy_children)
+// the annotations need to be updated to have the right parent
+BOOST_AUTO_TEST_CASE( update_annotations_seqref )
+{
+ Sequence s1("AAAAGGGG");
+ s1.add_annotation("A", "A", 0, 4);
+ BOOST_CHECK_EQUAL(s1.annotations().size(), 1);
+ BOOST_CHECK_EQUAL(s1.seqspan(), s1.annotations().front()->parent() );
+
+ Sequence subseq1(s1.subseq(2,4));
+ BOOST_CHECK_EQUAL(subseq1.annotations().size(), 1);
+ BOOST_CHECK_EQUAL(subseq1.annotations().front()->parentStart(), 0 );
+ BOOST_CHECK_EQUAL(subseq1.annotations().front()->parentStop(), 2 );
+ BOOST_CHECK_EQUAL(subseq1.seqspan(), subseq1.annotations().front()->parent() );
+}
+