NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <corelib/ncbi_system.hpp>
#include <corelib/ncbiapp.hpp>
#include <objmgr/scope.hpp>
#include <objmgr/object_manager.hpp>
#include <objects/misc/sequence_macros.hpp>
#include <objects/seqtable/SeqTable_column.hpp>
#include <corelib/test_boost.hpp>
#include <gui/packages/pkg_sequence_edit/strain_serotype_influenza.hpp>
#include <gui/packages/pkg_sequence_edit/featedit_util.hpp>
#include <gui/packages/pkg_sequence_edit/add_deflinedlg.hpp>
#include <gui/packages/pkg_sequence_edit/prefix_deflinedlg.hpp>
#include <gui/packages/pkg_sequence_edit/field_choice_panel.hpp>
#include <gui/packages/pkg_sequence_edit/miscedit_util.hpp>
#include <gui/widgets/edit/field_type_constants.hpp>
#include <gui/objutils/cmd_create_feat.hpp>
#include <gui/objutils/cmd_add_seqentry.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Functions | |
NCBITEST_AUTO_INIT () | |
NCBITEST_AUTO_FINI () | |
void | ReadEntry (const string &name, CSeq_entry_Handle &seh) |
BOOST_AUTO_TEST_CASE (Test_MultipleStrains) | |
BOOST_AUTO_TEST_CASE (Test_MultipleStrainsEmpty) | |
BOOST_AUTO_TEST_CASE (Test_AddStrainSerotype) | |
BOOST_AUTO_TEST_CASE (Test_FixInfluenzaNames) | |
BOOST_AUTO_TEST_CASE (Test_ParsingNoConflicts) | |
BOOST_AUTO_TEST_CASE (Test_ParsingWithConflictsUpdate) | |
BOOST_AUTO_TEST_CASE (Test_ParsingWithConflictsNoUpdate) | |
BOOST_AUTO_TEST_CASE (Test_SplittingStructuredCollections) | |
BOOST_AUTO_TEST_CASE (Test_TrimmingOrganismNames) | |
BOOST_AUTO_TEST_CASE (Test_AddrRNa) | |
BOOST_AUTO_TEST_CASE (Test_AddControlRegion) | |
BOOST_AUTO_TEST_CASE (Test_AddMicrosatellite) | |
BOOST_AUTO_TEST_CASE (Test_AddDefLine) | |
BOOST_AUTO_TEST_CASE (Test_RemoveDefLines) | |
BOOST_AUTO_TEST_CASE (Test_PrefixDefline) | |
BOOST_AUTO_TEST_CASE (Test_Automatch) | |
BOOST_AUTO_TEST_CASE (Test_LooksLikeHeader) | |
CRef< CUser_object > | x_MakeDefaultTextOptions (size_t num_cols) |
void | x_TestPair (CSeq_entry_Handle seh, const string &match, const string &field, const vector< string > &match_vals, const vector< string > &field_vals) |
void | x_TestList (CSeq_entry_Handle seh, const string &match, const vector< string > &field_list, const vector< string > &match_vals, const vector< vector< string > > &field_vals) |
Variables | |
USING_NCBI_SCOPE | |
const char * | sc_TestEntry_multiplestrains |
const char * | sc_TestEntry_mtplstrains_empty |
const char * | sc_TestEntry_addstrainserotype |
const char * | sc_TestEntry_fixorganismnames |
const char * | sc_TestEntry_noparsing |
const char * | sc_TestEntry_parsingnoconflicts |
const char * | sc_TestEntry_parsingwithconflicts |
const char * | sc_TestEntry_splitstructcollections |
const char * | sc_TestEntry_trimorgnames |
const char * | sc_TestEntry_addfeat |
const char * | sc_TestEntry_adddefline |
const char * | sc_TestEntry_removedeflines |
const char * | sc_TestEntry_prefixtodeflines |
const char * | sc_TestEntry_apply_table |
BOOST_AUTO_TEST_CASE | ( | Test_AddControlRegion | ) |
Definition at line 661 of file unit_test_pkg_seqedit.cpp.
References CreateControlRegion(), eExtreme_Biological, eNa_strand_plus, CCmdComposite::Execute(), CSeq_feat_Base::GetComment(), CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_feat_Base::GetData(), CSeq_interval_Base::GetFrom(), CSeq_interval_Base::GetId(), CSeqFeatData_Base::GetImp(), CSeq_loc_Base::GetInt(), CImp_feat_Base::GetKey(), CSeq_feat_Base::GetLocation(), CSeq_feat_Base::GetPartial(), CSeq_interval_Base::GetStrand(), CSeq_interval_Base::GetTo(), CSeqFeatData_Base::IsImp(), CSeq_loc_Base::IsInt(), CSeq_interval::IsPartialStart(), CSeq_interval::IsPartialStop(), CSeq_feat_Base::IsSetData(), CSeq_feat_Base::IsSetLocation(), CSeq_feat_Base::IsSetPartial(), CSeq_interval_Base::IsSetStrand(), ReadEntry(), sc_TestEntry_addfeat, CSeq_feat_Base::SetLocation(), VISIT_ALL_BIOSEQS_WITHIN_SEQENTRY, and CSeq_id_Base::Which().
BOOST_AUTO_TEST_CASE | ( | Test_AddDefLine | ) |
Definition at line 749 of file unit_test_pkg_seqedit.cpp.
References cmd, CountDefLineConflicts(), eExistingText_replace_old, CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_adddefline, UpdateAllDefinitionLine(), and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_AddMicrosatellite | ) |
Definition at line 703 of file unit_test_pkg_seqedit.cpp.
References CreateMicrosatellite(), eExtreme_Biological, eNa_strand_plus, CCmdComposite::Execute(), CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_feat_Base::GetData(), CSeq_interval_Base::GetFrom(), CSeq_interval_Base::GetId(), CSeqFeatData_Base::GetImp(), CSeq_loc_Base::GetInt(), CImp_feat_Base::GetKey(), CSeq_feat_Base::GetLocation(), CSeq_feat_Base::GetQual(), CSeq_interval_Base::GetStrand(), CSeq_interval_Base::GetTo(), CSeqFeatData_Base::IsImp(), CSeq_loc_Base::IsInt(), CSeq_interval::IsPartialStart(), CSeq_interval::IsPartialStop(), CSeq_feat_Base::IsSetData(), CSeq_feat_Base::IsSetLocation(), CSeq_feat_Base::IsSetPartial(), CSeq_interval_Base::IsSetStrand(), ReadEntry(), sc_TestEntry_addfeat, CSeq_feat_Base::SetLocation(), VISIT_ALL_BIOSEQS_WITHIN_SEQENTRY, and CSeq_id_Base::Which().
BOOST_AUTO_TEST_CASE | ( | Test_AddrRNa | ) |
Definition at line 618 of file unit_test_pkg_seqedit.cpp.
References AddNamedrRna(), eExtreme_Biological, eNa_strand_plus, CRNA_ref_Base::eType_rRNA, CCmdComposite::Execute(), CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_feat_Base::GetData(), CRNA_ref_Base::GetExt(), CSeq_interval_Base::GetFrom(), CSeq_interval_Base::GetId(), CSeq_loc_Base::GetInt(), CSeq_feat_Base::GetLocation(), CRNA_ref_Base::C_Ext::GetName(), CSeq_feat_Base::GetPartial(), CSeqFeatData_Base::GetRna(), CSeq_interval_Base::GetStrand(), CSeq_interval_Base::GetTo(), CRNA_ref_Base::GetType(), CSeq_loc_Base::IsInt(), CSeq_interval::IsPartialStart(), CSeq_interval::IsPartialStop(), CSeqFeatData_Base::IsRna(), CSeq_feat_Base::IsSetData(), CSeq_feat_Base::IsSetLocation(), CSeq_feat_Base::IsSetPartial(), CSeq_interval_Base::IsSetStrand(), ReadEntry(), rna, sc_TestEntry_addfeat, CSeq_feat_Base::SetLocation(), VISIT_ALL_BIOSEQS_WITHIN_SEQENTRY, and CSeq_id_Base::Which().
BOOST_AUTO_TEST_CASE | ( | Test_AddStrainSerotype | ) |
Definition at line 150 of file unit_test_pkg_seqedit.cpp.
References CStrainSerotypeInfluenza::eCommandInfluenza_add, NStr::eNocase, NStr::Equal(), COrgMod_Base::eSubtype_old_name, CCmdComposite::Execute(), FOR_EACH_DBXREF_ON_ORGREF, FOR_EACH_ORGMOD_ON_BIOSOURCE, CStrainSerotypeInfluenza::GetCommand(), CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_addstrainserotype, and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_Automatch | ) |
Definition at line 2900 of file unit_test_pkg_seqedit.cpp.
References CFieldChoicePanel::AutoMatch().
BOOST_AUTO_TEST_CASE | ( | Test_FixInfluenzaNames | ) |
Definition at line 214 of file unit_test_pkg_seqedit.cpp.
References CStrainSerotypeInfluenza::eCommandInfluenza_fixup, NStr::eNocase, NStr::Equal(), COrgMod_Base::eSubtype_old_name, CCmdComposite::Execute(), FOR_EACH_DBXREF_ON_ORGREF, FOR_EACH_ORGMOD_ON_BIOSOURCE, CStrainSerotypeInfluenza::GetCommand(), CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_fixorganismnames, and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_LooksLikeHeader | ) |
Definition at line 2908 of file unit_test_pkg_seqedit.cpp.
References CFieldChoicePanel::LooksLikeHeader().
BOOST_AUTO_TEST_CASE | ( | Test_MultipleStrains | ) |
Definition at line 90 of file unit_test_pkg_seqedit.cpp.
References CStrainSerotypeInfluenza::eCommandSplitQualsAtCommas, COrgMod_Base::eSubtype_strain, CCmdComposite::Execute(), FOR_EACH_ORGMOD_ON_BIOSOURCE, CStrainSerotypeInfluenza::GetCommand(), CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_multiplestrains, and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_MultipleStrainsEmpty | ) |
Definition at line 122 of file unit_test_pkg_seqedit.cpp.
References CStrainSerotypeInfluenza::eCommandSplitQualsAtCommas, COrgMod_Base::eSubtype_strain, CCmdComposite::Execute(), FOR_EACH_ORGMOD_ON_BIOSOURCE, CStrainSerotypeInfluenza::GetCommand(), CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_mtplstrains_empty, and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_ParsingNoConflicts | ) |
Definition at line 279 of file unit_test_pkg_seqedit.cpp.
References CStrainSerotypeInfluenza::eCommandInfluenza_parse, COrgMod_Base::eSubtype_serotype, COrgMod_Base::eSubtype_strain, CCmdComposite::Execute(), FOR_EACH_ORGMOD_ON_BIOSOURCE, CStrainSerotypeInfluenza::GetCommand(), CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_parsingnoconflicts, and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_ParsingWithConflictsNoUpdate | ) |
Definition at line 363 of file unit_test_pkg_seqedit.cpp.
References CStrainSerotypeInfluenza::eCommandInfluenza_parse, COrgMod_Base::eSubtype_serotype, COrgMod_Base::eSubtype_strain, CCmdComposite::Execute(), FOR_EACH_ORGMOD_ON_BIOSOURCE, CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_parsingwithconflicts, TestCStrainSerotypeInfluenza_Parse(), and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_ParsingWithConflictsUpdate | ) |
Definition at line 314 of file unit_test_pkg_seqedit.cpp.
References CStrainSerotypeInfluenza::eCommandInfluenza_parse, COrgMod_Base::eSubtype_serotype, COrgMod_Base::eSubtype_strain, CCmdComposite::Execute(), FOR_EACH_ORGMOD_ON_BIOSOURCE, CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_parsingwithconflicts, TestCStrainSerotypeInfluenza_Parse(), and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_PrefixDefline | ) |
Definition at line 813 of file unit_test_pkg_seqedit.cpp.
References AddModToDefline(), AddModVectorToDefline(), AddOrgToDefline(), CSubSource_Base::eSubtype_haplotype, COrgMod_Base::eSubtype_isolate, COrgMod_Base::eSubtype_strain, CCmdComposite::Execute(), CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_entry_Base::IsSeq(), ReadEntry(), CRef< C, Locker >::Reset(), sc_TestEntry_prefixtodeflines, CCmdComposite::Unexecute(), and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_RemoveDefLines | ) |
Definition at line 782 of file unit_test_pkg_seqedit.cpp.
References CCmdComposite::Execute(), CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), RemoveTitlesSeqEntry(), sc_TestEntry_removedeflines, and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_SplittingStructuredCollections | ) |
Definition at line 420 of file unit_test_pkg_seqedit.cpp.
References CStrainSerotypeInfluenza::eCommandSplitStructuredCollections, COrgMod_Base::eSubtype_bio_material, COrgMod_Base::eSubtype_culture_collection, COrgMod_Base::eSubtype_specimen_voucher, CCmdComposite::Execute(), FOR_EACH_ORGMOD_ON_BIOSOURCE, CStrainSerotypeInfluenza::GetCommand(), CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_splitstructcollections, ncbi::grid::netcache::search::fields::size, and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
BOOST_AUTO_TEST_CASE | ( | Test_TrimmingOrganismNames | ) |
Definition at line 485 of file unit_test_pkg_seqedit.cpp.
References CStrainSerotypeInfluenza::eCommandTrimOrganismNames, NStr::eNocase, NStr::Equal(), CCmdComposite::Execute(), FOR_EACH_DBXREF_ON_ORGREF, CStrainSerotypeInfluenza::GetCommand(), CSeq_entry_Handle::GetCompleteSeq_entry(), ReadEntry(), sc_TestEntry_trimorgnames, and VISIT_ALL_SEQDESCS_WITHIN_SEQENTRY.
NCBITEST_AUTO_FINI | ( | ) |
Definition at line 76 of file unit_test_pkg_seqedit.cpp.
NCBITEST_AUTO_INIT | ( | ) |
Definition at line 72 of file unit_test_pkg_seqedit.cpp.
void ReadEntry | ( | const string & | name, |
CSeq_entry_Handle & | seh | ||
) |
Definition at line 80 of file unit_test_pkg_seqedit.cpp.
References CScope::AddTopLevelSeqEntry(), CObjectManager::GetInstance(), and MSerial_AsnText.
Referenced by BOOST_AUTO_TEST_CASE().
CRef<CUser_object> x_MakeDefaultTextOptions | ( | size_t | num_cols | ) |
Definition at line 2992 of file unit_test_pkg_seqedit.cpp.
References eExistingText_replace_old, i, MakeTableMetaInfoField(), and CUser_object_Base::SetData().
Referenced by x_TestList(), and x_TestPair().
void x_TestList | ( | CSeq_entry_Handle | seh, |
const string & | match, | ||
const vector< string > & | field_list, | ||
const vector< string > & | match_vals, | ||
const vector< vector< string > > & | field_vals | ||
) |
Definition at line 3070 of file unit_test_pkg_seqedit.cpp.
References CSeq_id::eContent, NStr::Equal(), CSeq_table_Base::GetColumns(), CSeqTable_column_Base::GetData(), CSeqTable_multi_data_Base::GetId(), GetMiscTableFromSeqEntry(), CSeqTable_multi_data_Base::GetString(), CSeqTable_multi_data_Base::IsId(), kSequenceIdColLabel, match(), row, CSeqTable_column_Base::SetData(), CSeqTable_column_Base::SetHeader(), ncbi::grid::netcache::search::fields::size, table, and x_MakeDefaultTextOptions().
void x_TestPair | ( | CSeq_entry_Handle | seh, |
const string & | match, | ||
const string & | field, | ||
const vector< string > & | match_vals, | ||
const vector< string > & | field_vals | ||
) |
Definition at line 3002 of file unit_test_pkg_seqedit.cpp.
References CSeq_id::eContent, NStr::Equal(), CSeq_table_Base::GetColumns(), CSeqTable_column_Base::GetData(), CSeqTable_multi_data_Base::GetId(), GetMiscTableFromSeqEntry(), CSeqTable_multi_data_Base::GetString(), CSeqTable_multi_data_Base::IsId(), kSequenceIdColLabel, match(), row, CSeqTable_column_Base::SetData(), CSeqTable_column_Base::SetHeader(), ncbi::grid::netcache::search::fields::size, table, and x_MakeDefaultTextOptions().
const char * sc_TestEntry_adddefline |
Definition at line 1325 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_addfeat |
Definition at line 1446 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_addstrainserotype |
Definition at line 2577 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char* sc_TestEntry_apply_table |
Definition at line 2932 of file unit_test_pkg_seqedit.cpp.
const char * sc_TestEntry_fixorganismnames |
Definition at line 2393 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_mtplstrains_empty |
Definition at line 2837 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_multiplestrains |
Definition at line 2775 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_noparsing |
Definition at line 2331 of file unit_test_pkg_seqedit.cpp.
const char * sc_TestEntry_parsingnoconflicts |
Definition at line 2215 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_parsingwithconflicts |
Definition at line 2121 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_prefixtodeflines |
Definition at line 981 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_removedeflines |
Definition at line 1206 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_splitstructcollections |
Definition at line 1998 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const char * sc_TestEntry_trimorgnames |
Definition at line 1497 of file unit_test_pkg_seqedit.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
USING_NCBI_SCOPE |
Definition at line 56 of file unit_test_pkg_seqedit.cpp.