NCBI C++ ToolKit
Classes | Typedefs | Enumerations | Functions
unit_test_util.hpp File Reference
#include <corelib/ncbistd.hpp>
#include <corelib/ncbifile.hpp>
#include <serial/serial.hpp>
#include <serial/objistr.hpp>
#include <serial/objostr.hpp>
#include <corelib/ncbidiag.hpp>
#include <serial/objectinfo.hpp>
#include <serial/serialbase.hpp>
#include <objmgr/scope.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seqfeat/BioSource.hpp>
#include <objects/seqfeat/SubSource.hpp>
#include <objects/seqfeat/OrgMod.hpp>
#include <objects/seqfeat/Seq_feat.hpp>
#include <objects/seqfeat/OrgName.hpp>
#include <objects/seq/MolInfo.hpp>
#include <objects/biblio/Author.hpp>
#include <objects/biblio/Auth_list.hpp>
#include <objects/biblio/Cit_art.hpp>
#include <objects/biblio/Cit_jour.hpp>
#include <objects/biblio/Cit_gen.hpp>
#include <objects/biblio/Imprint.hpp>
#include <objects/pub/Pub.hpp>
#include <objects/pub/Pub_equiv.hpp>
#include <objects/seq/Seq_data.hpp>
#include <objects/seq/Pubdesc.hpp>
#include <objects/seq/Delta_seq.hpp>
#include <objects/seq/Seq_ext.hpp>
#include <objects/seqset/Seq_entry.hpp>
#include <objects/general/Person_id.hpp>
#include <objects/general/Name_std.hpp>
#include <objects/general/Object_id.hpp>
#include <objtools/data_loaders/genbank/gbloader.hpp>
#include <map>
+ Include dependency graph for unit_test_util.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CGenBankFixture
 
class  ITestRunner
 

Typedefs

typedef int TTraverseAndRunTestCasesFlags
 

Enumerations

enum  ETraverseAndRunTestCasesFlags { fTraverseAndRunTestCasesFlags_DoNOTIgnoreREADMEFiles = (1 << 0) }
 Flags that control TraverseAndRunTestCases, if needed. More...
 

Functions

void SetDbxref (objects::CBioSource &src, string db, objects::CObject_id::TId id)
 
void SetDbxref (objects::CBioSource &src, string db, string id)
 
void SetDbxref (CRef< objects::CSeq_entry > entry, string db, objects::CObject_id::TId id)
 
void SetDbxref (CRef< objects::CSeq_entry > entry, string db, string id)
 
void SetDbxref (CRef< objects::CSeq_feat > feat, string db, objects::CObject_id::TId id)
 
void SetDbxref (CRef< objects::CSeq_feat > feat, string db, string id)
 
void RemoveDbxref (objects::CBioSource &src, string db, objects::CObject_id::TId id)
 
void RemoveDbxref (CRef< objects::CSeq_entry > entry, string db, objects::CObject_id::TId id)
 
void RemoveDbxref (CRef< objects::CSeq_feat > feat, string db, objects::CObject_id::TId id)
 
void SetSubSource (objects::CBioSource &src, objects::CSubSource::TSubtype subtype, string val)
 
void SetSubSource (CRef< objects::CSeq_entry > entry, objects::CSubSource::TSubtype subtype, string val)
 
void SetCompleteness (CRef< objects::CSeq_entry > entry, objects::CMolInfo::TCompleteness completeness)
 
void SetTaxon (objects::CBioSource &src, size_t taxon)
 
void SetTaxon (CRef< objects::CSeq_entry > entry, size_t taxon)
 
void AddGoodSource (CRef< objects::CSeq_entry > entry)
 
void AddFeatAnnotToSeqEntry (CRef< objects::CSeq_annot > annot, CRef< objects::CSeq_entry > entry)
 
CRef< objects::CSeq_feat > AddProtFeat (CRef< objects::CSeq_entry > entry)
 
CRef< objects::CSeq_feat > AddGoodSourceFeature (CRef< objects::CSeq_entry > entry)
 
CRef< objects::CSeq_feat > MakeMiscFeature (CRef< objects::CSeq_id > id, size_t right_end=10, size_t left_end=0)
 
CRef< objects::CSeq_id > IdFromEntry (CRef< objects::CSeq_entry > entry)
 
void SetTaxname (CRef< objects::CSeq_entry > entry, string taxname)
 
void SetSebaea_microphylla (CRef< objects::CSeq_entry > entry)
 
void SetSynthetic_construct (CRef< objects::CSeq_entry > entry)
 
void SetDrosophila_melanogaster (CRef< objects::CSeq_entry > entry)
 
void SetCommon (CRef< objects::CSeq_entry > entry, string common)
 
void SetLineage (CRef< objects::CSeq_entry > entry, string lineage)
 
void SetDiv (CRef< objects::CSeq_entry > entry, string div)
 
void SetOrigin (CRef< objects::CSeq_entry > entry, objects::CBioSource::TOrigin origin)
 
void SetGcode (CRef< objects::CSeq_entry > entry, objects::COrgName::TGcode gcode)
 
void SetMGcode (CRef< objects::CSeq_entry > entry, objects::COrgName::TGcode mgcode)
 
void SetPGcode (CRef< objects::CSeq_entry > entry, objects::COrgName::TGcode pgcode)
 
void ResetOrgname (CRef< objects::CSeq_entry > entry)
 
void SetFocus (CRef< objects::CSeq_entry > entry)
 
void ClearFocus (CRef< objects::CSeq_entry > entry)
 
void SetGenome (CRef< objects::CSeq_entry > entry, objects::CBioSource::TGenome genome)
 
void SetChromosome (objects::CBioSource &src, string chromosome)
 
void SetChromosome (CRef< objects::CSeq_entry > entry, string chromosome)
 
void SetTransgenic (objects::CBioSource &src, bool do_set)
 
void SetTransgenic (CRef< objects::CSeq_entry > entry, bool do_set)
 
void SetOrgMod (objects::CBioSource &src, objects::COrgMod::TSubtype subtype, string val)
 
void SetOrgMod (CRef< objects::CSeq_entry > entry, objects::COrgMod::TSubtype subtype, string val)
 
CRef< objects::CSeqdesc > BuildGoodPubSeqdesc ()
 
void AddGoodPub (CRef< objects::CSeq_entry > entry)
 
CRef< objects::CAuthor > BuildGoodAuthor ()
 
CRef< objects::CPub > BuildGoodArticlePub ()
 
CRef< objects::CPub > BuildGoodCitGenPub (CRef< objects::CAuthor > author, int serial_number)
 
CRef< objects::CPub > BuildGoodCitSubPub ()
 
void MakeSeqLong (objects::CBioseq &seq)
 
void SetBiomol (CRef< objects::CSeq_entry > entry, objects::CMolInfo::TBiomol biomol)
 
void SetTech (CRef< objects::CSeq_entry > entry, objects::CMolInfo::TTech tech)
 
CRef< objects::CSeq_entry > MakeProteinForGoodNucProtSet (string id)
 
CRef< objects::CSeq_feat > MakeCDSForGoodNucProtSet (const string &nuc_id, const string &prot_id)
 
void AdjustProtFeatForNucProtSet (CRef< objects::CSeq_entry > entry)
 
void SetNucProtSetProductName (CRef< objects::CSeq_entry > entry, string new_name)
 
CRef< objects::CSeq_entry > GetNucleotideSequenceFromGoodNucProtSet (CRef< objects::CSeq_entry > entry)
 
CRef< objects::CSeq_entry > GetProteinSequenceFromGoodNucProtSet (CRef< objects::CSeq_entry > entry)
 
CRef< objects::CSeq_feat > GetProtFeatFromGoodNucProtSet (CRef< objects::CSeq_entry > entry)
 
void RetranslateCdsForNucProtSet (CRef< objects::CSeq_entry > entry, objects::CScope &scope)
 
void SetNucProtSetPartials (CRef< objects::CSeq_entry > entry, bool partial5, bool partial3)
 
void SetProteinPartial (CRef< objects::CSeq_entry > pentry, bool partial5, bool partial3)
 
void ChangeNucProtSetProteinId (CRef< objects::CSeq_entry > entry, CRef< objects::CSeq_id > id)
 
void ChangeNucProtSetNucId (CRef< objects::CSeq_entry > entry, CRef< objects::CSeq_id > id)
 
void MakeNucProtSet3Partial (CRef< objects::CSeq_entry > entry)
 
void ChangeId (CRef< objects::CSeq_annot > annot, CRef< objects::CSeq_id > id)
 
void ChangeProductId (CRef< objects::CSeq_annot > annot, CRef< objects::CSeq_id > id)
 
void ChangeNucId (CRef< objects::CSeq_entry > np_set, CRef< objects::CSeq_id > id)
 
void ChangeProtId (CRef< objects::CSeq_entry > np_set, CRef< objects::CSeq_id > id)
 
CRef< objects::CSeq_id > BuildRefSeqId (void)
 
void ChangeId (CRef< objects::CSeq_entry > entry, CRef< objects::CSeq_id > id)
 
void ChangeId (CRef< objects::CSeq_annot > annot, string suffix)
 
void ChangeId (CRef< objects::CSeq_entry > entry, string suffix)
 
CRef< objects::CSeq_entry > BuildGenProdSetNucProtSet (CRef< objects::CSeq_id > nuc_id, CRef< objects::CSeq_id > prot_id)
 
CRef< objects::CSeq_feat > MakemRNAForCDS (CRef< objects::CSeq_feat > feat)
 
CRef< objects::CSeq_entry > BuildGoodGenProdSet ()
 
CRef< objects::CSeq_entry > GetGenomicFromGenProdSet (CRef< objects::CSeq_entry > entry)
 
CRef< objects::CSeq_feat > GetmRNAFromGenProdSet (CRef< objects::CSeq_entry > entry)
 
CRef< objects::CSeq_entry > GetNucProtSetFromGenProdSet (CRef< objects::CSeq_entry > entry)
 
CRef< objects::CSeq_feat > GetCDSFromGenProdSet (CRef< objects::CSeq_entry > entry)
 
void RevComp (objects::CBioseq &bioseq)
 
void RevComp (objects::CSeq_loc &loc, size_t len)
 
void RevComp (CRef< objects::CSeq_entry > entry)
 
void RemoveDeltaSeqGaps (CRef< objects::CSeq_entry > entry)
 
void AddToDeltaSeq (CRef< objects::CSeq_entry > entry, string seq)
 
CRef< objects::CSeq_entry > BuildSegSetPart (string id_str)
 
CRef< objects::CSeq_entry > BuildGoodSegSet (void)
 
CRef< objects::CSeq_entry > BuildGoodEcoSet ()
 
CRef< objects::CSeq_entry > BuildGoodEcoSetWithAlign (size_t front_insert=5)
 
CRef< objects::CSeq_align > BuildGoodAlign ()
 
void ReverseAlignmentStrand (objects::CDense_seg &denseg, size_t pos, size_t seq_len)
 
CRef< objects::CSeq_annot > BuildGoodGraphAnnot (string id)
 
void RemoveDescriptorType (CRef< objects::CSeq_entry > entry, objects::CSeqdesc::E_Choice desc_choice)
 
CRef< objects::CSeq_feat > BuildtRNA (CRef< objects::CSeq_id > id)
 
CRef< objects::CSeq_feat > BuildGoodtRNA (CRef< objects::CSeq_id > id)
 
CRef< objects::CSeq_loc > MakeMixLoc (CRef< objects::CSeq_id > id)
 
CRef< objects::CSeq_feat > MakeIntronForMixLoc (CRef< objects::CSeq_id > id)
 
void SetSpliceForMixLoc (objects::CBioseq &seq)
 
CRef< objects::CSeq_feat > MakeGeneForFeature (CRef< objects::CSeq_feat > feat)
 
CRef< objects::CSeq_feat > AddGoodImpFeat (CRef< objects::CSeq_entry > entry, string key)
 
CRef< objects::CSeq_feat > AddMiscFeature (CRef< objects::CSeq_entry > entry)
 
CRef< objects::CSeq_feat > AddMiscFeature (CRef< objects::CSeq_entry > entry, size_t right_end)
 
CRef< objects::CSeq_annot > AddFeat (CRef< objects::CSeq_feat > feat, CRef< objects::CSeq_entry > entry)
 
CRef< CSeq_featBuildGoodFeat ()
 
CRef< objects::CSeq_entry > BuildGoodNucProtSet (void)
 
CRef< objects::CSeq_entry > BuildGoodSeq (void)
 
CRef< objects::CSeq_entry > BuildGoodProtSeq (void)
 
CRef< objects::CSeq_entry > BuildGoodDeltaSeq (void)
 
CRef< objects::CSeq_feat > GetCDSFromGoodNucProtSet (CRef< objects::CSeq_entry > entry)
 
void TraverseAndRunTestCases (ITestRunner *pTestRunner, CDir dirWithTestCases, const set< string > &setOfRequiredSuffixes, const set< string > &setOfOptionalSuffixes=set< string >(), const set< string > &setOfIgnoredSuffixes=set< string >(), TTraverseAndRunTestCasesFlags fFlags=0)
 This is for running data-driven test cases below the given top-level test directory. More...
 

Typedef Documentation

◆ TTraverseAndRunTestCasesFlags

Definition at line 246 of file unit_test_util.hpp.

Enumeration Type Documentation

◆ ETraverseAndRunTestCasesFlags

Flags that control TraverseAndRunTestCases, if needed.

Enumerator
fTraverseAndRunTestCasesFlags_DoNOTIgnoreREADMEFiles 

Overrides default behavior (which is to disregard files whose prefix is "README")

Definition at line 242 of file unit_test_util.hpp.

Function Documentation

◆ AddFeat()

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

◆ AddFeatAnnotToSeqEntry()

void AddFeatAnnotToSeqEntry ( CRef< objects::CSeq_annot >  annot,
CRef< objects::CSeq_entry >  entry 
)

◆ AddGoodImpFeat()

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

◆ AddGoodPub()

void AddGoodPub ( CRef< objects::CSeq_entry >  entry)

◆ AddGoodSource()

void AddGoodSource ( CRef< objects::CSeq_entry >  entry)

◆ AddGoodSourceFeature()

CRef<objects::CSeq_feat> AddGoodSourceFeature ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ AddMiscFeature() [1/2]

CRef<objects::CSeq_feat> AddMiscFeature ( CRef< objects::CSeq_entry >  entry)

◆ AddMiscFeature() [2/2]

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

◆ AddProtFeat()

CRef<objects::CSeq_feat> AddProtFeat ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ AddToDeltaSeq()

void AddToDeltaSeq ( CRef< objects::CSeq_entry >  entry,
string  seq 
)

Referenced by BOOST_AUTO_TEST_CASE().

◆ AdjustProtFeatForNucProtSet()

void AdjustProtFeatForNucProtSet ( CRef< objects::CSeq_entry >  entry)

◆ BuildGenProdSetNucProtSet()

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ BuildGoodAlign()

CRef<objects::CSeq_align> BuildGoodAlign ( )

◆ BuildGoodArticlePub()

CRef<objects::CPub> BuildGoodArticlePub ( )

◆ BuildGoodAuthor()

CRef<objects::CAuthor> BuildGoodAuthor ( )

◆ BuildGoodCitGenPub()

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ BuildGoodCitSubPub()

CRef<objects::CPub> BuildGoodCitSubPub ( )

◆ BuildGoodDeltaSeq()

CRef<objects::CSeq_entry> BuildGoodDeltaSeq ( void  )

◆ BuildGoodEcoSet()

CRef<objects::CSeq_entry> BuildGoodEcoSet ( )

◆ BuildGoodEcoSetWithAlign()

CRef<objects::CSeq_entry> BuildGoodEcoSetWithAlign ( size_t  front_insert = 5)

◆ 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<objects::CSeq_entry> BuildGoodGenProdSet ( )

◆ BuildGoodGraphAnnot()

CRef<objects::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<objects::CSeq_entry> BuildGoodNucProtSet ( void  )

◆ BuildGoodProtSeq()

CRef<objects::CSeq_entry> BuildGoodProtSeq ( void  )

◆ BuildGoodPubSeqdesc()

CRef<objects::CSeqdesc> BuildGoodPubSeqdesc ( )

◆ BuildGoodSegSet()

CRef<objects::CSeq_entry> BuildGoodSegSet ( void  )

◆ BuildGoodSeq()

CRef<objects::CSeq_entry> BuildGoodSeq ( void  )

◆ BuildGoodtRNA()

CRef<objects::CSeq_feat> BuildGoodtRNA ( CRef< objects::CSeq_id >  id)

Referenced by BOOST_AUTO_TEST_CASE().

◆ BuildRefSeqId()

CRef<objects::CSeq_id> BuildRefSeqId ( void  )

Definition at line 1406 of file unit_test_util.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ BuildSegSetPart()

CRef<objects::CSeq_entry> BuildSegSetPart ( string  id_str)

◆ BuildtRNA()

CRef<objects::CSeq_feat> BuildtRNA ( CRef< objects::CSeq_id >  id)

Referenced by BOOST_AUTO_TEST_CASE().

◆ ChangeId() [1/4]

void ChangeId ( CRef< objects::CSeq_annot >  annot,
CRef< objects::CSeq_id >  id 
)

◆ ChangeId() [2/4]

void ChangeId ( CRef< objects::CSeq_annot >  annot,
string  suffix 
)

◆ ChangeId() [3/4]

void ChangeId ( CRef< objects::CSeq_entry >  entry,
CRef< objects::CSeq_id >  id 
)

◆ ChangeId() [4/4]

void ChangeId ( CRef< objects::CSeq_entry >  entry,
string  suffix 
)

◆ ChangeNucId()

void ChangeNucId ( CRef< objects::CSeq_entry >  np_set,
CRef< objects::CSeq_id >  id 
)

◆ ChangeNucProtSetNucId()

void ChangeNucProtSetNucId ( CRef< objects::CSeq_entry >  entry,
CRef< objects::CSeq_id >  id 
)

◆ ChangeNucProtSetProteinId()

void ChangeNucProtSetProteinId ( CRef< objects::CSeq_entry >  entry,
CRef< objects::CSeq_id >  id 
)

◆ ChangeProductId()

void ChangeProductId ( CRef< objects::CSeq_annot >  annot,
CRef< objects::CSeq_id >  id 
)

◆ ChangeProtId()

void ChangeProtId ( CRef< objects::CSeq_entry >  np_set,
CRef< objects::CSeq_id >  id 
)

◆ ClearFocus()

void ClearFocus ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ GetCDSFromGenProdSet()

CRef<objects::CSeq_feat> GetCDSFromGenProdSet ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ GetCDSFromGoodNucProtSet()

CRef<objects::CSeq_feat> GetCDSFromGoodNucProtSet ( CRef< objects::CSeq_entry >  entry)

◆ GetGenomicFromGenProdSet()

CRef<objects::CSeq_entry> GetGenomicFromGenProdSet ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ GetmRNAFromGenProdSet()

CRef<objects::CSeq_feat> GetmRNAFromGenProdSet ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ GetNucleotideSequenceFromGoodNucProtSet()

CRef<objects::CSeq_entry> GetNucleotideSequenceFromGoodNucProtSet ( CRef< objects::CSeq_entry >  entry)

◆ GetNucProtSetFromGenProdSet()

CRef<objects::CSeq_entry> GetNucProtSetFromGenProdSet ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ GetProteinSequenceFromGoodNucProtSet()

CRef<objects::CSeq_entry> GetProteinSequenceFromGoodNucProtSet ( CRef< objects::CSeq_entry >  entry)

◆ GetProtFeatFromGoodNucProtSet()

CRef<objects::CSeq_feat> GetProtFeatFromGoodNucProtSet ( CRef< objects::CSeq_entry >  entry)

◆ IdFromEntry()

CRef<objects::CSeq_id> IdFromEntry ( CRef< objects::CSeq_entry >  entry)

◆ MakeCDSForGoodNucProtSet()

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

◆ MakeGeneForFeature()

CRef<objects::CSeq_feat> MakeGeneForFeature ( CRef< objects::CSeq_feat >  feat)

◆ MakeIntronForMixLoc()

CRef<objects::CSeq_feat> MakeIntronForMixLoc ( CRef< objects::CSeq_id >  id)

Referenced by BOOST_AUTO_TEST_CASE().

◆ MakeMiscFeature()

CRef<objects::CSeq_feat> MakeMiscFeature ( CRef< objects::CSeq_id >  id,
size_t  right_end = 10,
size_t  left_end = 0 
)

◆ MakeMixLoc()

CRef<objects::CSeq_loc> MakeMixLoc ( CRef< objects::CSeq_id >  id)

◆ MakemRNAForCDS()

CRef<objects::CSeq_feat> MakemRNAForCDS ( CRef< objects::CSeq_feat >  feat)

◆ MakeNucProtSet3Partial()

void MakeNucProtSet3Partial ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ MakeProteinForGoodNucProtSet()

CRef<objects::CSeq_entry> MakeProteinForGoodNucProtSet ( string  id)

◆ MakeSeqLong()

void MakeSeqLong ( objects::CBioseq &  seq)

◆ RemoveDbxref() [1/3]

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

◆ RemoveDbxref() [2/3]

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

◆ RemoveDbxref() [3/3]

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ RemoveDeltaSeqGaps()

void RemoveDeltaSeqGaps ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ RemoveDescriptorType()

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ ResetOrgname()

void ResetOrgname ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ RetranslateCdsForNucProtSet()

void RetranslateCdsForNucProtSet ( CRef< objects::CSeq_entry >  entry,
objects::CScope &  scope 
)

◆ RevComp() [1/3]

void RevComp ( CRef< objects::CSeq_entry >  entry)

◆ RevComp() [2/3]

void RevComp ( objects::CBioseq &  bioseq)

◆ RevComp() [3/3]

void RevComp ( objects::CSeq_loc &  loc,
size_t  len 
)

◆ ReverseAlignmentStrand()

void ReverseAlignmentStrand ( objects::CDense_seg &  denseg,
size_t  pos,
size_t  seq_len 
)

◆ SetBiomol()

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

◆ SetChromosome() [1/2]

void SetChromosome ( CRef< objects::CSeq_entry >  entry,
string  chromosome 
)

◆ SetChromosome() [2/2]

void SetChromosome ( objects::CBioSource &  src,
string  chromosome 
)

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetCommon()

void SetCommon ( CRef< objects::CSeq_entry >  entry,
string  common 
)

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetCompleteness()

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

◆ SetDbxref() [1/6]

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

◆ SetDbxref() [2/6]

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

◆ SetDbxref() [3/6]

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

◆ SetDbxref() [4/6]

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

◆ SetDbxref() [5/6]

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetDbxref() [6/6]

void SetDbxref ( objects::CBioSource &  src,
string  db,
string  id 
)

◆ SetDiv()

void SetDiv ( CRef< objects::CSeq_entry >  entry,
string  div 
)

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetDrosophila_melanogaster()

void SetDrosophila_melanogaster ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetFocus()

void SetFocus ( CRef< objects::CSeq_entry >  entry)

◆ SetGcode()

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetGenome()

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

◆ SetLineage()

void SetLineage ( CRef< objects::CSeq_entry >  entry,
string  lineage 
)

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetMGcode()

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetNucProtSetPartials()

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetNucProtSetProductName()

void SetNucProtSetProductName ( CRef< objects::CSeq_entry >  entry,
string  new_name 
)

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetOrgMod() [1/2]

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

◆ SetOrgMod() [2/2]

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

◆ SetOrigin()

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetPGcode()

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

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetProteinPartial()

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

◆ SetSebaea_microphylla()

void SetSebaea_microphylla ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetSpliceForMixLoc()

void SetSpliceForMixLoc ( objects::CBioseq &  seq)

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetSubSource() [1/2]

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

◆ SetSubSource() [2/2]

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

◆ SetSynthetic_construct()

void SetSynthetic_construct ( CRef< objects::CSeq_entry >  entry)

Referenced by BOOST_AUTO_TEST_CASE().

◆ SetTaxname()

void SetTaxname ( CRef< objects::CSeq_entry >  entry,
string  taxname 
)

◆ SetTaxon() [1/2]

void SetTaxon ( CRef< objects::CSeq_entry >  entry,
size_t  taxon 
)

◆ SetTaxon() [2/2]

void SetTaxon ( objects::CBioSource &  src,
size_t  taxon 
)

◆ SetTech()

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

◆ SetTransgenic() [1/2]

void SetTransgenic ( CRef< objects::CSeq_entry >  entry,
bool  do_set 
)

◆ SetTransgenic() [2/2]

void SetTransgenic ( objects::CBioSource &  src,
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 Fri Apr 12 17:19:57 2024 by modify_doxy.py rev. 669887