void GenomeCopySegmentsWhenSequencesOutOfOrderTest::checkCallBack(const Alignment *alignment) { // FIXME: halAlignment->open() fails miserably but // openHalAlignmentReadOnly works? Probably some state isn't cleared // on close. AlignmentPtr tmp(getTestAlignmentInstances(alignment->getStorageFormat(), _path, WRITE_ACCESS)); _secondAlignment = tmp; Genome *copyRootGenome = _secondAlignment->openGenome("root"); Sequence *sequence2 = copyRootGenome->getSequenceBySite(0); CuAssertStrEquals(_testCase, sequence2->getName().c_str(), "Sequence1"); Sequence *sequence1 = copyRootGenome->getSequenceBySite(170); CuAssertStrEquals(_testCase, sequence1->getName().c_str(), "Sequence2"); Genome *copyInternalGenome = _secondAlignment->openGenome("internal"); sequence2 = copyInternalGenome->getSequenceBySite(0); CuAssertStrEquals(_testCase, sequence2->getName().c_str(), "Sequence2"); sequence1 = copyInternalGenome->getSequenceBySite(170); CuAssertStrEquals(_testCase, sequence1->getName().c_str(), "Sequence1"); checkBottomSegments(copyInternalGenome, 10, _testCase); validateAlignment(_secondAlignment.get()); _secondAlignment->close(); remove(_path.c_str()); }