NCBI C++ ToolKit
Functions
unit_test_util.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/seqfeat/BioSource.hpp>
#include <objects/seqfeat/Org_ref.hpp>
#include <objects/seqfeat/Imp_feat.hpp>
#include <objects/seqfeat/Cdregion.hpp>
#include <objects/seq/Seq_descr.hpp>
#include <objects/biblio/Id_pat.hpp>
#include <objects/biblio/Title.hpp>
#include <objects/general/User_object.hpp>
#include <objects/medline/Medline_entry.hpp>
#include <objects/misc/sequence_macros.hpp>
#include <objects/pub/Pub_equiv.hpp>
#include <objects/pub/Pub.hpp>
#include <objects/seq/GIBB_mol.hpp>
#include <objects/seq/Seq_ext.hpp>
#include <objects/seq/Delta_ext.hpp>
#include <objects/seq/Delta_seq.hpp>
#include <objects/seq/Seq_literal.hpp>
#include <objects/seq/Ref_ext.hpp>
#include <objects/seq/Map_ext.hpp>
#include <objects/seq/Seg_ext.hpp>
#include <objects/seq/Seq_gap.hpp>
#include <objects/seq/Seq_data.hpp>
#include <objects/seq/Seqdesc.hpp>
#include <objects/seq/MolInfo.hpp>
#include <objects/seq/Pubdesc.hpp>
#include <objects/seq/Seq_hist.hpp>
#include <objects/seq/Seq_hist_rec.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seqblock/GB_block.hpp>
#include <objects/seqblock/EMBL_block.hpp>
#include <objects/seqfeat/OrgName.hpp>
#include <objects/seqfeat/SubSource.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/seqloc/PDB_seq_id.hpp>
#include <objects/seqloc/Giimport_id.hpp>
#include <objects/seqloc/Patent_seq_id.hpp>
#include <objects/seqloc/Seq_loc.hpp>
#include <objects/seqloc/Seq_interval.hpp>
#include <objmgr/util/sequence.hpp>
#include <objtools/unit_test_util/unit_test_util.hpp>
#include <functional>
+ Include dependency graph for unit_test_util.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

void SetDbxref (CBioSource &src, string db, CObject_id::TId id)
 
void RemoveDbxref (CBioSource &src, string db, CObject_id::TId id)
 
void SetTaxon (CBioSource &src, size_t taxon)
 
CRef< CSeq_entryBuildGoodSeq ()
 
CRef< CSeqdescBuildGoodPubSeqdesc ()
 
void AddGoodPub (CRef< CSeq_entry > entry)
 
void AddGoodSource (CRef< CSeq_entry > entry)
 
void SetDbxref (CBioSource &src, string db, string id)
 
void SetDbxref (CRef< CSeq_entry > entry, string db, CObject_id::TId id)
 
void SetDbxref (CRef< CSeq_entry > entry, string db, string id)
 
void SetDbxref (CRef< CSeq_feat > feat, string db, CObject_id::TId id)
 
void SetDbxref (CRef< CSeq_feat > feat, string db, string id)
 
void RemoveDbxref (CRef< CSeq_entry > entry, string db, CObject_id::TId id)
 
void RemoveDbxref (CRef< CSeq_feat > feat, string db, CObject_id::TId id)
 
void SetTaxon (CRef< CSeq_entry > entry, size_t taxon)
 
void AddFeatAnnotToSeqEntry (CRef< CSeq_annot > annot, CRef< CSeq_entry > entry)
 
CRef< CSeq_annotAddFeat (CRef< CSeq_feat > feat, CRef< CSeq_entry > entry)
 
CRef< CSeq_featAddProtFeat (CRef< CSeq_entry > entry)
 
CRef< CSeq_featAddGoodSourceFeature (CRef< CSeq_entry > entry)
 
CRef< CSeq_featMakeMiscFeature (CRef< CSeq_id > id, size_t right_end, size_t left_end)
 
CRef< CSeq_featBuildGoodFeat ()
 
CRef< CSeq_idIdFromEntry (CRef< CSeq_entry > entry)
 
CRef< CSeq_featAddMiscFeature (CRef< CSeq_entry > entry, size_t right_end)
 
CRef< CSeq_featAddMiscFeature (CRef< CSeq_entry > entry)
 
void SetTaxname (CRef< CSeq_entry > entry, string taxname)
 
void SetSebaea_microphylla (CRef< CSeq_entry > entry)
 
void SetSynthetic_construct (CRef< CSeq_entry > entry)
 
void SetDrosophila_melanogaster (CRef< CSeq_entry > entry)
 
void SetCommon (CRef< CSeq_entry > entry, string common)
 
void SetLineage (CRef< CSeq_entry > entry, string lineage)
 
void SetDiv (CRef< CSeq_entry > entry, string div)
 
void SetOrigin (CRef< CSeq_entry > entry, CBioSource::TOrigin origin)
 
void SetGcode (CRef< CSeq_entry > entry, COrgName::TGcode gcode)
 
void SetMGcode (CRef< CSeq_entry > entry, COrgName::TGcode mgcode)
 
void SetPGcode (CRef< CSeq_entry > entry, COrgName::TGcode pgcode)
 
void ResetOrgname (CRef< CSeq_entry > entry)
 
void SetFocus (CRef< CSeq_entry > entry)
 
void ClearFocus (CRef< CSeq_entry > entry)
 
void SetGenome (CRef< CSeq_entry > entry, CBioSource::TGenome genome)
 
void SetSubSource (CBioSource &src, CSubSource::TSubtype subtype, string val)
 
void SetSubSource (CRef< CSeq_entry > entry, CSubSource::TSubtype subtype, string val)
 
void SetChromosome (CBioSource &src, string chromosome)
 
void SetChromosome (CRef< CSeq_entry > entry, string chromosome)
 
void SetTransgenic (CBioSource &src, bool do_set)
 
void SetTransgenic (CRef< CSeq_entry > entry, bool do_set)
 
void SetOrgMod (CBioSource &src, COrgMod::TSubtype subtype, string val)
 
void SetOrgMod (CRef< CSeq_entry > entry, COrgMod::TSubtype subtype, string val)
 
CRef< CAuthorBuildGoodAuthor ()
 
CRef< CPubBuildGoodArticlePub ()
 
CRef< CPubBuildGoodCitGenPub (CRef< CAuthor > author, int serial_number)
 
CRef< CPubBuildGoodCitSubPub ()
 
void MakeSeqLong (CBioseq &seq)
 
void SetBiomol (CRef< CSeq_entry > entry, CMolInfo::TBiomol biomol)
 
void SetTech (CRef< CSeq_entry > entry, CMolInfo::TTech tech)
 
void SetCompleteness (CRef< CSeq_entry > entry, CMolInfo::TCompleteness completeness)
 
CRef< CSeq_entryBuildGoodProtSeq ()
 
CRef< CSeq_entryMakeProteinForGoodNucProtSet (string id)
 
CRef< CSeq_featMakeCDSForGoodNucProtSet (const string &nuc_id, const string &prot_id)
 
CRef< CSeq_entryBuildGoodNucProtSet ()
 
void AdjustProtFeatForNucProtSet (CRef< CSeq_entry > entry)
 
void SetNucProtSetProductName (CRef< CSeq_entry > entry, string new_name)
 
CRef< CSeq_featGetCDSFromGoodNucProtSet (CRef< CSeq_entry > entry)
 
CRef< CSeq_entryGetNucleotideSequenceFromGoodNucProtSet (CRef< CSeq_entry > entry)
 
CRef< CSeq_entryGetProteinSequenceFromGoodNucProtSet (CRef< CSeq_entry > entry)
 
CRef< CSeq_featGetProtFeatFromGoodNucProtSet (CRef< CSeq_entry > entry)
 
void RetranslateCdsForNucProtSet (CRef< CSeq_entry > entry, CScope &scope)
 
void SetProteinPartial (CRef< CSeq_entry > pentry, bool partial5, bool partial3)
 
void SetNucProtSetPartials (CRef< CSeq_entry > entry, bool partial5, bool partial3)
 
void ChangeNucProtSetProteinId (CRef< CSeq_entry > entry, CRef< CSeq_id > id)
 
void ChangeNucProtSetNucId (CRef< CSeq_entry > entry, CRef< CSeq_id > id)
 
void MakeNucProtSet3Partial (CRef< CSeq_entry > entry)
 
void ChangeId (CRef< CSeq_annot > annot, CRef< CSeq_id > id)
 
void ChangeProductId (CRef< CSeq_annot > annot, CRef< CSeq_id > id)
 
void ChangeNucId (CRef< CSeq_entry > np_set, CRef< CSeq_id > id)
 
void ChangeProtId (CRef< CSeq_entry > np_set, CRef< CSeq_id > id)
 
CRef< CSeq_idBuildRefSeqId ()
 
void ChangeId (CRef< CSeq_entry > entry, CRef< CSeq_id > id)
 
void ChangeId (CRef< CSeq_annot > annot, string suffix)
 
void ChangeId (CRef< CSeq_entry > entry, string suffix)
 
CRef< CSeq_entryBuildGenProdSetNucProtSet (CRef< CSeq_id > nuc_id, CRef< CSeq_id > prot_id)
 
CRef< CSeq_featMakemRNAForCDS (CRef< CSeq_feat > feat)
 
CRef< CSeq_entryBuildGoodGenProdSet ()
 
CRef< CSeq_entryGetGenomicFromGenProdSet (CRef< CSeq_entry > entry)
 
CRef< CSeq_featGetmRNAFromGenProdSet (CRef< CSeq_entry > entry)
 
CRef< CSeq_entryGetNucProtSetFromGenProdSet (CRef< CSeq_entry > entry)
 
CRef< CSeq_featGetCDSFromGenProdSet (CRef< CSeq_entry > entry)
 
void RevComp (CBioseq &bioseq)
 
void RevComp (CSeq_loc &loc, size_t len)
 
void RevComp (CRef< CSeq_entry > entry)
 
CRef< CSeq_entryBuildGoodDeltaSeq ()
 
void RemoveDeltaSeqGaps (CRef< CSeq_entry > entry)
 
void AddToDeltaSeq (CRef< CSeq_entry > entry, string seq)
 
CRef< CSeq_entryBuildSegSetPart (string id_str)
 
CRef< CSeq_entryBuildGoodSegSet ()
 
CRef< CSeq_entryBuildGoodEcoSet ()
 
CRef< CSeq_entryBuildGoodEcoSetWithAlign (size_t front_insert)
 
void ReverseAlignmentStrand (CDense_seg &denseg, size_t pos, size_t seq_len)
 
CRef< CSeq_alignBuildGoodAlign ()
 
CRef< CSeq_annotBuildGoodGraphAnnot (string id)
 
void RemoveDescriptorType (CRef< CSeq_entry > entry, CSeqdesc::E_Choice desc_choice)
 
CRef< CSeq_featBuildtRNA (CRef< CSeq_id > id)
 
CRef< CSeq_featBuildGoodtRNA (CRef< CSeq_id > id)
 
CRef< CSeq_locMakeMixLoc (CRef< CSeq_id > id)
 
CRef< CSeq_featMakeIntronForMixLoc (CRef< CSeq_id > id)
 
void SetSpliceForMixLoc (CBioseq &seq)
 
CRef< CSeq_featMakeGeneForFeature (CRef< CSeq_feat > feat)
 
CRef< CSeq_featAddGoodImpFeat (CRef< CSeq_entry > entry, string key)
 
void TraverseAndRunTestCases (ITestRunner *pTestRunner, CDir dirWithTestCases, const set< string > &setOfRequiredSuffixes, const set< string > &setOfOptionalSuffixes, const set< string > &setOfIgnoredSuffixes, TTraverseAndRunTestCasesFlags fFlags)
 This is for running data-driven test cases below the given top-level test directory. More...
 

Function Documentation

◆ AddFeat()

CRef<CSeq_annot> AddFeat ( CRef< CSeq_feat feat,
CRef< CSeq_entry entry 
)

◆ AddFeatAnnotToSeqEntry()

void AddFeatAnnotToSeqEntry ( CRef< CSeq_annot annot,
CRef< CSeq_entry entry 
)

◆ AddGoodImpFeat()

CRef<CSeq_feat> AddGoodImpFeat ( CRef< CSeq_entry entry,
string  key 
)

◆ AddGoodPub()

void AddGoodPub ( CRef< CSeq_entry entry)

◆ AddGoodSource()

void AddGoodSource ( CRef< CSeq_entry entry)

◆ AddGoodSourceFeature()

CRef<CSeq_feat> AddGoodSourceFeature ( CRef< CSeq_entry entry)

◆ AddMiscFeature() [1/2]

CRef<CSeq_feat> AddMiscFeature ( CRef< CSeq_entry entry)

Definition at line 453 of file unit_test_util.cpp.

References AddMiscFeature().

◆ AddMiscFeature() [2/2]

CRef<CSeq_feat> AddMiscFeature ( CRef< CSeq_entry entry,
size_t  right_end 
)

◆ AddProtFeat()

CRef<CSeq_feat> AddProtFeat ( CRef< CSeq_entry entry)

◆ AddToDeltaSeq()

void AddToDeltaSeq ( CRef< CSeq_entry entry,
string  seq 
)

◆ AdjustProtFeatForNucProtSet()

void AdjustProtFeatForNucProtSet ( CRef< CSeq_entry entry)

◆ BuildGenProdSetNucProtSet()

CRef<CSeq_entry> BuildGenProdSetNucProtSet ( CRef< CSeq_id nuc_id,
CRef< CSeq_id prot_id 
)

◆ BuildGoodAlign()

CRef<CSeq_align> BuildGoodAlign ( )

◆ BuildGoodArticlePub()

CRef<CPub> BuildGoodArticlePub ( )

◆ BuildGoodAuthor()

CRef<CAuthor> BuildGoodAuthor ( )

◆ BuildGoodCitGenPub()

CRef<CPub> BuildGoodCitGenPub ( CRef< CAuthor author,
int  serial_number 
)

◆ BuildGoodCitSubPub()

CRef<CPub> BuildGoodCitSubPub ( )

◆ BuildGoodDeltaSeq()

CRef<CSeq_entry> BuildGoodDeltaSeq ( void  )

◆ BuildGoodEcoSet()

CRef<CSeq_entry> BuildGoodEcoSet ( )

◆ BuildGoodEcoSetWithAlign()

CRef<CSeq_entry> BuildGoodEcoSetWithAlign ( size_t  front_insert)

◆ BuildGoodFeat()

CRef<CSeq_feat> BuildGoodFeat ( )

Definition at line 419 of file unit_test_util.cpp.

References CSeq_feat_Base::SetData(), and CSeq_feat_Base::SetLocation().

Referenced by BOOST_AUTO_TEST_CASE().

◆ BuildGoodGenProdSet()

CRef<CSeq_entry> BuildGoodGenProdSet ( )

◆ BuildGoodGraphAnnot()

CRef<CSeq_annot> BuildGoodGraphAnnot ( string  id)

Definition at line 1878 of file unit_test_util.cpp.

References CSeq_annot_Base::SetData(), and CSeq_graph_Base::SetLoc().

Referenced by BOOST_AUTO_TEST_CASE().

◆ BuildGoodNucProtSet()

CRef<CSeq_entry> BuildGoodNucProtSet ( void  )

◆ BuildGoodProtSeq()

CRef<CSeq_entry> BuildGoodProtSeq ( void  )

◆ BuildGoodPubSeqdesc()

CRef<CSeqdesc> BuildGoodPubSeqdesc ( )

◆ BuildGoodSegSet()

CRef<CSeq_entry> BuildGoodSegSet ( void  )

◆ BuildGoodSeq()

CRef<CSeq_entry> BuildGoodSeq ( void  )

◆ BuildGoodtRNA()

CRef<CSeq_feat> BuildGoodtRNA ( CRef< CSeq_id id)

Definition at line 1919 of file unit_test_util.cpp.

References BuildtRNA(), and CSeq_feat_Base::SetData().

◆ BuildRefSeqId()

CRef<CSeq_id> BuildRefSeqId ( void  )

Definition at line 1406 of file unit_test_util.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ BuildSegSetPart()

CRef<CSeq_entry> BuildSegSetPart ( string  id_str)

◆ BuildtRNA()

CRef<CSeq_feat> BuildtRNA ( CRef< CSeq_id id)

◆ ChangeId() [1/4]

void ChangeId ( CRef< CSeq_annot annot,
CRef< CSeq_id id 
)

◆ ChangeId() [2/4]

void ChangeId ( CRef< CSeq_annot annot,
string  suffix 
)

Definition at line 1435 of file unit_test_util.cpp.

References CSeq_annot::IsFtable(), CSeq_annot_Base::SetData(), and suffix.

◆ ChangeId() [3/4]

void ChangeId ( CRef< CSeq_entry entry,
CRef< CSeq_id id 
)

◆ ChangeId() [4/4]

void ChangeId ( CRef< CSeq_entry entry,
string  suffix 
)

◆ ChangeNucId()

void ChangeNucId ( CRef< CSeq_entry np_set,
CRef< CSeq_id id 
)

◆ ChangeNucProtSetNucId()

void ChangeNucProtSetNucId ( CRef< CSeq_entry entry,
CRef< CSeq_id id 
)

◆ ChangeNucProtSetProteinId()

void ChangeNucProtSetProteinId ( CRef< CSeq_entry entry,
CRef< CSeq_id id 
)

◆ ChangeProductId()

void ChangeProductId ( CRef< CSeq_annot annot,
CRef< CSeq_id id 
)

Definition at line 1350 of file unit_test_util.cpp.

References CSeq_annot::IsFtable(), and CSeq_annot_Base::SetData().

Referenced by ChangeProtId().

◆ ChangeProtId()

void ChangeProtId ( CRef< CSeq_entry np_set,
CRef< CSeq_id id 
)

◆ ClearFocus()

void ClearFocus ( CRef< CSeq_entry entry)

◆ GetCDSFromGenProdSet()

CRef<CSeq_feat> GetCDSFromGenProdSet ( CRef< CSeq_entry entry)

◆ GetCDSFromGoodNucProtSet()

CRef<CSeq_feat> GetCDSFromGoodNucProtSet ( CRef< CSeq_entry entry)

◆ GetGenomicFromGenProdSet()

CRef<CSeq_entry> GetGenomicFromGenProdSet ( CRef< CSeq_entry entry)

◆ GetmRNAFromGenProdSet()

CRef<CSeq_feat> GetmRNAFromGenProdSet ( CRef< CSeq_entry entry)

◆ GetNucleotideSequenceFromGoodNucProtSet()

CRef<CSeq_entry> GetNucleotideSequenceFromGoodNucProtSet ( CRef< CSeq_entry entry)

◆ GetNucProtSetFromGenProdSet()

CRef<CSeq_entry> GetNucProtSetFromGenProdSet ( CRef< CSeq_entry entry)

◆ GetProteinSequenceFromGoodNucProtSet()

CRef<CSeq_entry> GetProteinSequenceFromGoodNucProtSet ( CRef< CSeq_entry entry)

◆ GetProtFeatFromGoodNucProtSet()

CRef<CSeq_feat> GetProtFeatFromGoodNucProtSet ( CRef< CSeq_entry entry)

◆ IdFromEntry()

CRef<CSeq_id> IdFromEntry ( CRef< CSeq_entry entry)

◆ MakeCDSForGoodNucProtSet()

CRef<CSeq_feat> MakeCDSForGoodNucProtSet ( const string nuc_id,
const string prot_id 
)

◆ MakeGeneForFeature()

CRef<CSeq_feat> MakeGeneForFeature ( CRef< CSeq_feat feat)

◆ MakeIntronForMixLoc()

CRef<CSeq_feat> MakeIntronForMixLoc ( CRef< CSeq_id id)

◆ MakeMiscFeature()

CRef<CSeq_feat> MakeMiscFeature ( CRef< CSeq_id id,
size_t  right_end,
size_t  left_end 
)

Definition at line 408 of file unit_test_util.cpp.

References CSeq_feat_Base::SetData(), and CSeq_feat_Base::SetLocation().

Referenced by AddMiscFeature().

◆ MakeMixLoc()

CRef<CSeq_loc> MakeMixLoc ( CRef< CSeq_id id)

Definition at line 1929 of file unit_test_util.cpp.

References CSeq_loc::SetInt(), and CSeq_loc::SetMix().

◆ MakemRNAForCDS()

CRef<CSeq_feat> MakemRNAForCDS ( CRef< CSeq_feat feat)

◆ MakeNucProtSet3Partial()

void MakeNucProtSet3Partial ( CRef< CSeq_entry entry)

◆ MakeProteinForGoodNucProtSet()

CRef<CSeq_entry> MakeProteinForGoodNucProtSet ( string  id)

◆ MakeSeqLong()

void MakeSeqLong ( CBioseq seq)

◆ RemoveDbxref() [1/3]

void RemoveDbxref ( CBioSource src,
string  db,
CObject_id::TId  id 
)

◆ RemoveDbxref() [2/3]

void RemoveDbxref ( CRef< CSeq_entry entry,
string  db,
CObject_id::TId  id 
)

◆ RemoveDbxref() [3/3]

void RemoveDbxref ( CRef< CSeq_feat feat,
string  db,
CObject_id::TId  id 
)

◆ RemoveDeltaSeqGaps()

void RemoveDeltaSeqGaps ( CRef< CSeq_entry entry)

Definition at line 1661 of file unit_test_util.cpp.

References len, CBioseq_Base::SetInst(), and CSeq_entry_Base::SetSeq().

◆ RemoveDescriptorType()

void RemoveDescriptorType ( CRef< CSeq_entry entry,
CSeqdesc::E_Choice  desc_choice 
)

◆ ResetOrgname()

void ResetOrgname ( CRef< CSeq_entry entry)

◆ RetranslateCdsForNucProtSet()

void RetranslateCdsForNucProtSet ( CRef< CSeq_entry entry,
CScope scope 
)

◆ RevComp() [1/3]

void RevComp ( CBioseq bioseq)

◆ RevComp() [2/3]

void RevComp ( CRef< CSeq_entry entry)

◆ RevComp() [3/3]

void RevComp ( CSeq_loc loc,
size_t  len 
)

◆ ReverseAlignmentStrand()

void ReverseAlignmentStrand ( CDense_seg denseg,
size_t  pos,
size_t  seq_len 
)

◆ SetBiomol()

void SetBiomol ( CRef< CSeq_entry entry,
CMolInfo::TBiomol  biomol 
)

◆ SetChromosome() [1/2]

void SetChromosome ( CBioSource src,
string  chromosome 
)

◆ SetChromosome() [2/2]

void SetChromosome ( CRef< CSeq_entry entry,
string  chromosome 
)

◆ SetCommon()

void SetCommon ( CRef< CSeq_entry entry,
string  common 
)

◆ SetCompleteness()

void SetCompleteness ( CRef< CSeq_entry entry,
CMolInfo::TCompleteness  completeness 
)

◆ SetDbxref() [1/6]

void SetDbxref ( CBioSource src,
string  db,
CObject_id::TId  id 
)

Definition at line 92 of file unit_test_util.cpp.

References CDbtag_Base::SetDb(), and CDbtag_Base::SetTag().

Referenced by SetDbxref(), and SetTaxon().

◆ SetDbxref() [2/6]

void SetDbxref ( CBioSource src,
string  db,
string  id 
)

◆ SetDbxref() [3/6]

void SetDbxref ( CRef< CSeq_entry entry,
string  db,
CObject_id::TId  id 
)

◆ SetDbxref() [4/6]

void SetDbxref ( CRef< CSeq_entry entry,
string  db,
string  id 
)

◆ SetDbxref() [5/6]

void SetDbxref ( CRef< CSeq_feat feat,
string  db,
CObject_id::TId  id 
)

◆ SetDbxref() [6/6]

void SetDbxref ( CRef< CSeq_feat feat,
string  db,
string  id 
)

◆ SetDiv()

void SetDiv ( CRef< CSeq_entry entry,
string  div 
)

◆ SetDrosophila_melanogaster()

void SetDrosophila_melanogaster ( CRef< CSeq_entry entry)

Definition at line 504 of file unit_test_util.cpp.

References SetTaxname(), and SetTaxon().

◆ SetFocus()

void SetFocus ( CRef< CSeq_entry entry)

◆ SetGcode()

void SetGcode ( CRef< CSeq_entry entry,
COrgName::TGcode  gcode 
)

◆ SetGenome()

void SetGenome ( CRef< CSeq_entry entry,
CBioSource::TGenome  genome 
)

◆ SetLineage()

void SetLineage ( CRef< CSeq_entry entry,
string  lineage 
)

◆ SetMGcode()

void SetMGcode ( CRef< CSeq_entry entry,
COrgName::TGcode  mgcode 
)

◆ SetNucProtSetPartials()

void SetNucProtSetPartials ( CRef< CSeq_entry entry,
bool  partial5,
bool  partial3 
)

◆ SetNucProtSetProductName()

void SetNucProtSetProductName ( CRef< CSeq_entry entry,
string  new_name 
)

◆ SetOrgMod() [1/2]

void SetOrgMod ( CBioSource src,
COrgMod::TSubtype  subtype,
string  val 
)

◆ SetOrgMod() [2/2]

void SetOrgMod ( CRef< CSeq_entry entry,
COrgMod::TSubtype  subtype,
string  val 
)

◆ SetOrigin()

void SetOrigin ( CRef< CSeq_entry entry,
CBioSource::TOrigin  origin 
)

◆ SetPGcode()

void SetPGcode ( CRef< CSeq_entry entry,
COrgName::TGcode  pgcode 
)

◆ SetProteinPartial()

void SetProteinPartial ( CRef< CSeq_entry pentry,
bool  partial5,
bool  partial3 
)

◆ SetSebaea_microphylla()

void SetSebaea_microphylla ( CRef< CSeq_entry entry)

Definition at line 488 of file unit_test_util.cpp.

References SetTaxname(), and SetTaxon().

◆ SetSpliceForMixLoc()

void SetSpliceForMixLoc ( CBioseq seq)

Definition at line 1957 of file unit_test_util.cpp.

References CBioseq_Base::SetInst().

◆ SetSubSource() [1/2]

void SetSubSource ( CBioSource src,
CSubSource::TSubtype  subtype,
string  val 
)

◆ SetSubSource() [2/2]

void SetSubSource ( CRef< CSeq_entry entry,
CSubSource::TSubtype  subtype,
string  val 
)

◆ SetSynthetic_construct()

void SetSynthetic_construct ( CRef< CSeq_entry entry)

Definition at line 496 of file unit_test_util.cpp.

References SetTaxname(), and SetTaxon().

◆ SetTaxname()

void SetTaxname ( CRef< CSeq_entry entry,
string  taxname 
)

◆ SetTaxon() [1/2]

void SetTaxon ( CBioSource src,
size_t  taxon 
)

◆ SetTaxon() [2/2]

void SetTaxon ( CRef< CSeq_entry entry,
size_t  taxon 
)

◆ SetTech()

void SetTech ( CRef< CSeq_entry entry,
CMolInfo::TTech  tech 
)

◆ SetTransgenic() [1/2]

void SetTransgenic ( CBioSource src,
bool  do_set 
)

◆ SetTransgenic() [2/2]

void SetTransgenic ( CRef< CSeq_entry entry,
bool  do_set 
)

◆ TraverseAndRunTestCases()

void TraverseAndRunTestCases ( ITestRunner pTestRunner,
CDir  dirWithTestCases,
const set< string > &  setOfRequiredSuffixes,
const set< string > &  setOfOptionalSuffixes = setstring >(),
const set< string > &  setOfIgnoredSuffixes = setstring >(),
TTraverseAndRunTestCasesFlags  fFlags = 0 
)

This is for running data-driven test cases below the given top-level test directory.

In a given directory, each file is checked for its prefix and suffix, where the prefix is the part before the first '.' and the suffix is the part after. (e.g. "foo.input.asn" has prefix "foo" and suffix "input.asn"). Files with the same prefix are assumed to belong to the same test.

There can be more than one test case in a test-case descendent dir and test-cases is even permitted to have zero subdirectories and have all the files be at the top level (though this could get messy if you have many test cases)

Any errors are handled through ITestRunner::OnError except for a NULL ITestRunner which, by necessity, is handled by throwing an exception.

Parameters
pTestRunnerThis class's "RunTest" func is called for each test.
dirWithTestCasesThis is the directory holding the test cases. Sub-directories of this are also checked for test-cases, although hidden subdirectories and files (that is, those starting with a period, such as ".svn") are skipped.
setOfRequiredSuffixesEach test must have exactly one file with the given suffix. If any test is missing any required suffix, this function will halt before running any tests. At least one required suffix must be specified.
setOfOptionalSuffixesThese are the suffixes permitted but not required for each test.
setOfIgnoredSuffixesThis is the set of suffixes that are just ignored and not passed to the pTestRunner. If a file is found whose suffix is not in one of the "setOf[FOO]Suffixes" parameters, then an error will occur, except that files with prefix "README" are also ignored.
fFlagsThis controls the behavior of the function (usually not needed).

Definition at line 2037 of file unit_test_util.cpp.

References map_checker< Container >::begin(), set< Key, Compare >::begin(), CDirEntry::CreateAbsolutePath(), map_checker< Container >::end(), set< Key, Compare >::end(), ERASE_ITERATE, CDir::Exists(), fFF_File, fFF_Recursive, NStr::Find(), set< Key, Compare >::find(), FindFilesInDir(), fTraverseAndRunTestCasesFlags_DoNOTIgnoreREADMEFiles, CDirEntry::GetPath(), CDirEntry::GetPathSeparator(), CDirEntry::IsDir(), ITERATE, NCBI_USER_THROW_FMT, NPOS, ITestRunner::OnError(), ITestRunner::RunTest(), set< Key, Compare >::size(), NStr::SplitInTwo(), NStr::StartsWith(), string, and transform().

Referenced by BOOST_AUTO_TEST_CASE().

Modified on Tue May 28 05:53:38 2024 by modify_doxy.py rev. 669887