NCBI C++ ToolKit
Classes | Macros | Enumerations | Functions | Variables
seqdb_unit_test.cpp File Reference
#include <ncbi_pch.hpp>
#include <objtools/blast/seqdb_reader/seqdbexpert.hpp>
#include <objtools/blast/seqdb_reader/column_reader.hpp>
#include <objtools/blast/seqdb_reader/seqdbcommon.hpp>
#include <objects/blastdb/defline_extra.hpp>
#include <serial/serialbase.hpp>
#include <objects/seq/seq__.hpp>
#include <corelib/ncbifile.hpp>
#include <util/sequtil/sequtil_convert.hpp>
#include <objmgr/util/sequence.hpp>
#include <objtools/blast/seqdb_reader/impl/seqdbisam.hpp>
#include <cmath>
#include <algorithm>
#include <random>
#include <chrono>
#include <corelib/test_boost.hpp>
+ Include dependency graph for seqdb_unit_test.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CTmpEnvironmentSetter
 
class  CSimpleGiList
 
class  CSeqIdList
 
class  CNegativeIdList
 
struct  SDbSumInfo
 
class  CTestThread
 

Macros

#define NCBI_TEST_APPLICATION
 
#define DEV_NULL   "nul:"
 
#define BEGIN(X)   (X)
 
#define END(X)   ((X) + (sizeof (X) / sizeof *(X)))
 

Enumerations

enum  EMaskingType {
  eAll , eOdd , eEven , ePrime ,
  eEND
}
 

Functions

 USING_SCOPE (objects)
 
template<class A , class B , class C , class D , class E >
string s_ToString (const A &a, const B &b, const C &c, const D &d, const E &e)
 
static void s_TestPartialAmbigRange (CSeqDB &db, int oid, int begin, int end)
 
static void s_TestPartialAmbig (CSeqDB &db, TGi nt_gi)
 
static bool s_MaskingTest (EMaskingType mask, unsigned oid)
 
static void s_TestMaskingLimits (EMaskingType mask, unsigned first, unsigned last, unsigned lowest, unsigned highest, unsigned count)
 
template<class NUM , class DIF >
void s_ApproxEqual (NUM a, NUM b, DIF epsilon, int lineno)
 
static Uint4 s_BufHash (const char *buf_in, Uint4 length, Uint4 start=1)
 
template<class ASNOBJ >
string s_Stringify (CRef< ASNOBJ > a)
 
 BOOST_AUTO_TEST_CASE (ConstructLocal)
 
 BOOST_AUTO_TEST_CASE (PathDelimiters)
 
 BOOST_AUTO_TEST_CASE (ConstructMissing)
 
 BOOST_AUTO_TEST_CASE (InvalidSeqType)
 
 BOOST_AUTO_TEST_CASE (ValidPath)
 
 BOOST_AUTO_TEST_CASE (InvalidPath)
 
 BOOST_AUTO_TEST_CASE (SummaryDataN)
 
 BOOST_AUTO_TEST_CASE (SummaryDataP)
 
 BOOST_AUTO_TEST_CASE (GetAmbigSeqAllocN)
 
 BOOST_AUTO_TEST_CASE (GetAmbigSeqAllocP)
 
 BOOST_AUTO_TEST_CASE (GetAmbigSeqN)
 
 BOOST_AUTO_TEST_CASE (GetAmbigSeqP)
 
 BOOST_AUTO_TEST_CASE (GetBioseqN)
 
 BOOST_AUTO_TEST_CASE (GetBioseqP)
 
 BOOST_AUTO_TEST_CASE (GetHdrN)
 
 BOOST_AUTO_TEST_CASE (GetHdrP)
 
 BOOST_AUTO_TEST_CASE (GetSeqIDsN)
 
 BOOST_AUTO_TEST_CASE (GetSeqIDsP)
 
 BOOST_AUTO_TEST_CASE (GetSeqLength)
 
 BOOST_AUTO_TEST_CASE (GetSeqLengthApprox)
 
 BOOST_AUTO_TEST_CASE (GetSequenceN)
 
 BOOST_AUTO_TEST_CASE (GetSequenceP)
 
 BOOST_AUTO_TEST_CASE (NrAndSwissProt)
 
 BOOST_AUTO_TEST_CASE (TranslateIdents)
 
 BOOST_AUTO_TEST_CASE (StringIdentSearch)
 
 BOOST_AUTO_TEST_CASE (AmbigBioseq)
 
 BOOST_AUTO_TEST_CASE (GetLenHighOID)
 
 BOOST_AUTO_TEST_CASE (GetLenNegOID)
 
 BOOST_AUTO_TEST_CASE (GetSeqHighOID)
 
 BOOST_AUTO_TEST_CASE (GetSeqNegOID)
 
 BOOST_AUTO_TEST_CASE (Offset2OidBadOffset)
 
 BOOST_AUTO_TEST_CASE (Offset2OidBadOid)
 
 BOOST_AUTO_TEST_CASE (Offset2OidMonotony)
 
 BOOST_AUTO_TEST_CASE (OpenWithBLASTDBEnv)
 
 BOOST_AUTO_TEST_CASE (OpenWithoutBLASTDBEnv)
 
 BOOST_AUTO_TEST_CASE (GiLists)
 
 BOOST_AUTO_TEST_CASE (OidRanges)
 
 BOOST_AUTO_TEST_CASE (GiListOidRange)
 
 BOOST_AUTO_TEST_CASE (EmptyDBList)
 
 BOOST_AUTO_TEST_CASE (IsBinaryGiList_True)
 
 BOOST_AUTO_TEST_CASE (IsBinaryGiList_False)
 
 BOOST_AUTO_TEST_CASE (IsBinaryGiList_EmptyFile)
 
 BOOST_AUTO_TEST_CASE (IsBinaryGiList_InvalidFile)
 
 BOOST_AUTO_TEST_CASE (BinaryUserGiList)
 
 BOOST_AUTO_TEST_CASE (TextUserGiList)
 
 BOOST_AUTO_TEST_CASE (UserSeqIdList)
 
 BOOST_AUTO_TEST_CASE (CSeqDBFileGiList_GetGis)
 
 BOOST_AUTO_TEST_CASE (TwoGiListsOneVolume)
 
 BOOST_AUTO_TEST_CASE (GetTaxIDs_gi_to_taxid)
 
 BOOST_AUTO_TEST_CASE (GetLeafTaxIDs_gi_to_taxid_set)
 
 BOOST_AUTO_TEST_CASE (GetTaxIDs_vector_of_taxids)
 
 BOOST_AUTO_TEST_CASE (GetLeafTaxIDs_vector_of_taxids)
 
 BOOST_AUTO_TEST_CASE (PartialSequences)
 
 BOOST_AUTO_TEST_CASE (GiListInOidRangeIteration)
 
 BOOST_AUTO_TEST_CASE (SeqidToOid)
 
 BOOST_AUTO_TEST_CASE (TestResetInternalChunkBookmark)
 
 BOOST_AUTO_TEST_CASE (ExpertNullConstructor)
 
 BOOST_AUTO_TEST_CASE (ExpertTaxInfo)
 
 BOOST_AUTO_TEST_CASE (ExpertRawData)
 
 BOOST_AUTO_TEST_CASE (ExpertRawDataProteinNulls)
 
 BOOST_AUTO_TEST_CASE (ExpertRawDataLength)
 
 BOOST_AUTO_TEST_CASE (ExpertIdBounds)
 
 BOOST_AUTO_TEST_CASE (ExpertIdBoundsNoPig)
 
 BOOST_AUTO_TEST_CASE (ResolveDbPath)
 
 BOOST_AUTO_TEST_CASE (IntersectionGiList)
 
 BOOST_AUTO_TEST_CASE (IntersectionNegGiList)
 
 BOOST_AUTO_TEST_CASE (ComputedList)
 
 BOOST_AUTO_TEST_CASE (ComplexComputedList)
 
static bool s_DbHasOID (CSeqDB &db, int &count, int oid)
 
 BOOST_AUTO_TEST_CASE (ComputedListFilter)
 
 BOOST_AUTO_TEST_CASE (SharedMemoryMaps)
 
 BOOST_AUTO_TEST_CASE (SeqIdList)
 
 BOOST_AUTO_TEST_CASE (OidToGiLookup)
 
 BOOST_AUTO_TEST_CASE (SeqIdListAndGiList)
 
 BOOST_AUTO_TEST_CASE (EmptyVolume)
 
 BOOST_AUTO_TEST_CASE (GetSeqData_Protein)
 
 BOOST_AUTO_TEST_CASE (GetSeqData_Nucleotide)
 
 BOOST_AUTO_TEST_CASE (OidRewriting)
 
 BOOST_AUTO_TEST_CASE (GetSequenceAsString)
 
 BOOST_AUTO_TEST_CASE (TotalLengths)
 
static void s_ModifyMap (map< int, int > &m, int key, int c, int &total)
 
static void s_MapAllGis (CSeqDB &db, map< int, int > &m, int change, int &total)
 
 BOOST_AUTO_TEST_CASE (NegativeGiList)
 
 BOOST_AUTO_TEST_CASE (NegativeListNt)
 
 BOOST_AUTO_TEST_CASE (NegativeListSwissprot)
 
 BOOST_AUTO_TEST_CASE (HashToOid)
 
 BOOST_AUTO_TEST_CASE (FilteredHeaders)
 
static void s_CheckIdLookup (CSeqDB &db, const string &acc, size_t exp_oids, size_t exp_size)
 
 BOOST_AUTO_TEST_CASE (ProtOldTest)
 
 BOOST_AUTO_TEST_CASE (ProtTest)
 
 BOOST_AUTO_TEST_CASE (NuclOldTest)
 
 BOOST_AUTO_TEST_CASE (NuclTest)
 
 BOOST_AUTO_TEST_CASE (PdbIdWithChain)
 
 BOOST_AUTO_TEST_CASE (UserDefinedColumns)
 
 BOOST_AUTO_TEST_CASE (VersionedSparseId)
 
 BOOST_AUTO_TEST_CASE (MaskDataColumn)
 
 BOOST_AUTO_TEST_CASE (CheckColumnFailureCleanup)
 
 BOOST_AUTO_TEST_CASE (EmptyMaskData)
 
 BOOST_AUTO_TEST_CASE (OidAndGiLists)
 
 BOOST_AUTO_TEST_CASE (DeltaSequenceHash)
 
 BOOST_AUTO_TEST_CASE (RestartWithVolumes)
 
 BOOST_AUTO_TEST_CASE (ExtractBlastDefline)
 
 BOOST_AUTO_TEST_CASE (TestDiskUsage)
 
 BOOST_AUTO_TEST_CASE (FindGnomonIds)
 
 BOOST_AUTO_TEST_CASE (TestOidNotFoundWithUserAliasFileAndGiList)
 
 BOOST_AUTO_TEST_CASE (TestSpaceInDbName)
 
 BOOST_AUTO_TEST_CASE (MultiTaxidBlastDefLine)
 
 BOOST_AUTO_TEST_CASE (SingleTaxidBlastDefLine)
 
 BOOST_AUTO_TEST_CASE (CSeqDBIsam_32bit_GI)
 
 BOOST_AUTO_TEST_CASE (Test_SeqIdList_AliasFile)
 
 BOOST_AUTO_TEST_CASE (Test_SeqIdList_FilteredID)
 
 BOOST_AUTO_TEST_CASE (Test_Multi_SeqIdList_AliasFile)
 
 BOOST_AUTO_TEST_CASE (Test_Mix_GI_SeqId_List_AliasFile)
 
 BOOST_AUTO_TEST_CASE (Test_Mix_User_SeqIdList_AliasFile)
 
 BOOST_AUTO_TEST_CASE (PigListSwissprot)
 
 BOOST_AUTO_TEST_CASE (CombinedFilters)
 
 BOOST_AUTO_TEST_CASE (TaxFilterWithGiListDB)
 
 BOOST_AUTO_TEST_CASE (TestMemoryMapFile)
 
 BOOST_AUTO_TEST_CASE (TestMemoryMapFile_MT)
 
 BOOST_AUTO_TEST_CASE (TestTaxIdsLookup)
 
 BOOST_AUTO_TEST_CASE (TestTaxIdsLookup_v4)
 

Variables

 USING_NCBI_SCOPE
 

Macro Definition Documentation

◆ BEGIN

#define BEGIN (   X)    (X)

Definition at line 1774 of file seqdb_unit_test.cpp.

◆ DEV_NULL

#define DEV_NULL   "nul:"

Definition at line 55 of file seqdb_unit_test.cpp.

◆ END

#define END (   X)    ((X) + (sizeof (X) / sizeof *(X)))

Definition at line 1775 of file seqdb_unit_test.cpp.

◆ NCBI_TEST_APPLICATION

#define NCBI_TEST_APPLICATION

Definition at line 32 of file seqdb_unit_test.cpp.

Enumeration Type Documentation

◆ EMaskingType

Enumerator
eAll 
eOdd 
eEven 
ePrime 
eEND 

Definition at line 73 of file seqdb_unit_test.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/117]

BOOST_AUTO_TEST_CASE ( AmbigBioseq  )

◆ BOOST_AUTO_TEST_CASE() [2/117]

BOOST_AUTO_TEST_CASE ( BinaryUserGiList  )

Definition at line 1609 of file seqdb_unit_test.cpp.

References CSeqDB::CheckOrFindOID(), and CSeqDB::eProtein.

◆ BOOST_AUTO_TEST_CASE() [3/117]

BOOST_AUTO_TEST_CASE ( CheckColumnFailureCleanup  )

Definition at line 3841 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, and CSeqDB::GetAvailableMaskAlgorithms().

◆ BOOST_AUTO_TEST_CASE() [4/117]

BOOST_AUTO_TEST_CASE ( CombinedFilters  )

◆ BOOST_AUTO_TEST_CASE() [5/117]

BOOST_AUTO_TEST_CASE ( ComplexComputedList  )

◆ BOOST_AUTO_TEST_CASE() [6/117]

BOOST_AUTO_TEST_CASE ( ComputedList  )

Definition at line 2456 of file seqdb_unit_test.cpp.

References CSeqDBIdSet::eAnd, CSeqDBIdSet::eGi, CSeqDBGiList::FindGi(), and i.

◆ BOOST_AUTO_TEST_CASE() [7/117]

BOOST_AUTO_TEST_CASE ( ComputedListFilter  )

◆ BOOST_AUTO_TEST_CASE() [8/117]

BOOST_AUTO_TEST_CASE ( ConstructLocal  )

Definition at line 257 of file seqdb_unit_test.cpp.

References CSeqDB::eFilteredAll, CSeqDB::eProtein, and CSeqDB::GetTotals().

◆ BOOST_AUTO_TEST_CASE() [9/117]

BOOST_AUTO_TEST_CASE ( ConstructMissing  )

Definition at line 287 of file seqdb_unit_test.cpp.

References CSeqDB::eFilteredAll, CSeqDB::eProtein, and CSeqDB::GetTotals().

◆ BOOST_AUTO_TEST_CASE() [10/117]

BOOST_AUTO_TEST_CASE ( CSeqDBFileGiList_GetGis  )

◆ BOOST_AUTO_TEST_CASE() [11/117]

BOOST_AUTO_TEST_CASE ( CSeqDBIsam_32bit_GI  )

◆ BOOST_AUTO_TEST_CASE() [12/117]

BOOST_AUTO_TEST_CASE ( DeltaSequenceHash  )

◆ BOOST_AUTO_TEST_CASE() [13/117]

BOOST_AUTO_TEST_CASE ( EmptyDBList  )

Definition at line 1568 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein.

◆ BOOST_AUTO_TEST_CASE() [14/117]

BOOST_AUTO_TEST_CASE ( EmptyMaskData  )

◆ BOOST_AUTO_TEST_CASE() [15/117]

BOOST_AUTO_TEST_CASE ( EmptyVolume  )

◆ BOOST_AUTO_TEST_CASE() [16/117]

BOOST_AUTO_TEST_CASE ( ExpertIdBounds  )

Definition at line 2267 of file seqdb_unit_test.cpp.

References count, CSeqDB::eProtein, and nr().

◆ BOOST_AUTO_TEST_CASE() [17/117]

BOOST_AUTO_TEST_CASE ( ExpertIdBoundsNoPig  )

◆ BOOST_AUTO_TEST_CASE() [18/117]

BOOST_AUTO_TEST_CASE ( ExpertNullConstructor  )

Definition at line 2166 of file seqdb_unit_test.cpp.

◆ BOOST_AUTO_TEST_CASE() [19/117]

BOOST_AUTO_TEST_CASE ( ExpertRawData  )

◆ BOOST_AUTO_TEST_CASE() [20/117]

BOOST_AUTO_TEST_CASE ( ExpertRawDataLength  )

◆ BOOST_AUTO_TEST_CASE() [21/117]

BOOST_AUTO_TEST_CASE ( ExpertRawDataProteinNulls  )

◆ BOOST_AUTO_TEST_CASE() [22/117]

BOOST_AUTO_TEST_CASE ( ExpertTaxInfo  )

Definition at line 2172 of file seqdb_unit_test.cpp.

References CSeqDB::GetTaxInfo(), and info.

◆ BOOST_AUTO_TEST_CASE() [23/117]

BOOST_AUTO_TEST_CASE ( ExtractBlastDefline  )

◆ BOOST_AUTO_TEST_CASE() [24/117]

BOOST_AUTO_TEST_CASE ( FilteredHeaders  )

◆ BOOST_AUTO_TEST_CASE() [25/117]

BOOST_AUTO_TEST_CASE ( FindGnomonIds  )

◆ BOOST_AUTO_TEST_CASE() [26/117]

BOOST_AUTO_TEST_CASE ( GetAmbigSeqAllocN  )

◆ BOOST_AUTO_TEST_CASE() [27/117]

BOOST_AUTO_TEST_CASE ( GetAmbigSeqAllocP  )

◆ BOOST_AUTO_TEST_CASE() [28/117]

BOOST_AUTO_TEST_CASE ( GetAmbigSeqN  )

◆ BOOST_AUTO_TEST_CASE() [29/117]

BOOST_AUTO_TEST_CASE ( GetAmbigSeqP  )

◆ BOOST_AUTO_TEST_CASE() [30/117]

BOOST_AUTO_TEST_CASE ( GetBioseqN  )

Definition at line 534 of file seqdb_unit_test.cpp.

References CSeqDB::eNucleotide, expected, GetBioseq(), and s_Stringify().

◆ BOOST_AUTO_TEST_CASE() [31/117]

BOOST_AUTO_TEST_CASE ( GetBioseqP  )

Definition at line 577 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, expected, GetBioseq(), and s_Stringify().

◆ BOOST_AUTO_TEST_CASE() [32/117]

BOOST_AUTO_TEST_CASE ( GetHdrN  )

Definition at line 619 of file seqdb_unit_test.cpp.

References CSeqDB::eNucleotide, expected, and s_Stringify().

◆ BOOST_AUTO_TEST_CASE() [33/117]

BOOST_AUTO_TEST_CASE ( GetHdrP  )

Definition at line 641 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, expected, and s_Stringify().

◆ BOOST_AUTO_TEST_CASE() [34/117]

BOOST_AUTO_TEST_CASE ( GetLeafTaxIDs_gi_to_taxid_set  )

◆ BOOST_AUTO_TEST_CASE() [35/117]

BOOST_AUTO_TEST_CASE ( GetLeafTaxIDs_vector_of_taxids  )

◆ BOOST_AUTO_TEST_CASE() [36/117]

BOOST_AUTO_TEST_CASE ( GetLenHighOID  )

◆ BOOST_AUTO_TEST_CASE() [37/117]

BOOST_AUTO_TEST_CASE ( GetLenNegOID  )

Definition at line 1161 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, CSeqDB::GetSeqLength(), and len.

◆ BOOST_AUTO_TEST_CASE() [38/117]

BOOST_AUTO_TEST_CASE ( GetSeqData_Nucleotide  )

◆ BOOST_AUTO_TEST_CASE() [39/117]

BOOST_AUTO_TEST_CASE ( GetSeqData_Protein  )

◆ BOOST_AUTO_TEST_CASE() [40/117]

BOOST_AUTO_TEST_CASE ( GetSeqHighOID  )

◆ BOOST_AUTO_TEST_CASE() [41/117]

BOOST_AUTO_TEST_CASE ( GetSeqIDsN  )

◆ BOOST_AUTO_TEST_CASE() [42/117]

BOOST_AUTO_TEST_CASE ( GetSeqIDsP  )

Definition at line 688 of file seqdb_unit_test.cpp.

References cnt, CSeqDB::eProtein, CSeqDB::GetSeqIDs(), i, s_BufHash(), and s_Stringify().

◆ BOOST_AUTO_TEST_CASE() [43/117]

BOOST_AUTO_TEST_CASE ( GetSeqLength  )

◆ BOOST_AUTO_TEST_CASE() [44/117]

BOOST_AUTO_TEST_CASE ( GetSeqLengthApprox  )

◆ BOOST_AUTO_TEST_CASE() [45/117]

BOOST_AUTO_TEST_CASE ( GetSeqNegOID  )

Definition at line 1204 of file seqdb_unit_test.cpp.

References buffer, CSeqDB::eProtein, CSeqDB::GetSequence(), and len.

◆ BOOST_AUTO_TEST_CASE() [46/117]

BOOST_AUTO_TEST_CASE ( GetSequenceAsString  )

Definition at line 3163 of file seqdb_unit_test.cpp.

References CSeqDB::eNucleotide, CSeqDB::eProtein, N, P, and prot.

◆ BOOST_AUTO_TEST_CASE() [47/117]

BOOST_AUTO_TEST_CASE ( GetSequenceN  )

◆ BOOST_AUTO_TEST_CASE() [48/117]

BOOST_AUTO_TEST_CASE ( GetSequenceP  )

◆ BOOST_AUTO_TEST_CASE() [49/117]

BOOST_AUTO_TEST_CASE ( GetTaxIDs_gi_to_taxid  )

◆ BOOST_AUTO_TEST_CASE() [50/117]

BOOST_AUTO_TEST_CASE ( GetTaxIDs_vector_of_taxids  )

◆ BOOST_AUTO_TEST_CASE() [51/117]

BOOST_AUTO_TEST_CASE ( GiListInOidRangeIteration  )

◆ BOOST_AUTO_TEST_CASE() [52/117]

BOOST_AUTO_TEST_CASE ( GiListOidRange  )

◆ BOOST_AUTO_TEST_CASE() [53/117]

BOOST_AUTO_TEST_CASE ( GiLists  )

Definition at line 1346 of file seqdb_unit_test.cpp.

References dbname(), CSeqDB::eNucleotide, CSeqDB::eProtein, ITERATE, and names.

◆ BOOST_AUTO_TEST_CASE() [54/117]

BOOST_AUTO_TEST_CASE ( HashToOid  )

◆ BOOST_AUTO_TEST_CASE() [55/117]

BOOST_AUTO_TEST_CASE ( IntersectionGiList  )

Definition at line 2365 of file seqdb_unit_test.cpp.

References CSeqDBGiList::FindGi(), GI_CONST, GI_FROM, and i.

◆ BOOST_AUTO_TEST_CASE() [56/117]

BOOST_AUTO_TEST_CASE ( IntersectionNegGiList  )

◆ BOOST_AUTO_TEST_CASE() [57/117]

BOOST_AUTO_TEST_CASE ( InvalidPath  )

Definition at line 335 of file seqdb_unit_test.cpp.

References CSeqDB::eFilteredAll, CSeqDB::eProtein, and CSeqDB::GetTotals().

◆ BOOST_AUTO_TEST_CASE() [58/117]

BOOST_AUTO_TEST_CASE ( InvalidSeqType  )

Definition at line 310 of file seqdb_unit_test.cpp.

◆ BOOST_AUTO_TEST_CASE() [59/117]

BOOST_AUTO_TEST_CASE ( IsBinaryGiList_EmptyFile  )

Definition at line 1595 of file seqdb_unit_test.cpp.

References SeqDB_IsBinaryGiList().

◆ BOOST_AUTO_TEST_CASE() [60/117]

BOOST_AUTO_TEST_CASE ( IsBinaryGiList_False  )

Definition at line 1589 of file seqdb_unit_test.cpp.

References SeqDB_IsBinaryGiList().

◆ BOOST_AUTO_TEST_CASE() [61/117]

BOOST_AUTO_TEST_CASE ( IsBinaryGiList_InvalidFile  )

Definition at line 1601 of file seqdb_unit_test.cpp.

References DEV_NULL, and SeqDB_IsBinaryGiList().

◆ BOOST_AUTO_TEST_CASE() [62/117]

BOOST_AUTO_TEST_CASE ( IsBinaryGiList_True  )

Definition at line 1584 of file seqdb_unit_test.cpp.

References SeqDB_IsBinaryGiList().

◆ BOOST_AUTO_TEST_CASE() [63/117]

BOOST_AUTO_TEST_CASE ( MaskDataColumn  )

◆ BOOST_AUTO_TEST_CASE() [64/117]

BOOST_AUTO_TEST_CASE ( MultiTaxidBlastDefLine  )

◆ BOOST_AUTO_TEST_CASE() [65/117]

BOOST_AUTO_TEST_CASE ( NegativeGiList  )

◆ BOOST_AUTO_TEST_CASE() [66/117]

BOOST_AUTO_TEST_CASE ( NegativeListNt  )

◆ BOOST_AUTO_TEST_CASE() [67/117]

BOOST_AUTO_TEST_CASE ( NegativeListSwissprot  )

◆ BOOST_AUTO_TEST_CASE() [68/117]

BOOST_AUTO_TEST_CASE ( NrAndSwissProt  )

◆ BOOST_AUTO_TEST_CASE() [69/117]

BOOST_AUTO_TEST_CASE ( NuclOldTest  )

Definition at line 3645 of file seqdb_unit_test.cpp.

References CSeqDB::eUnknown, and s_CheckIdLookup().

◆ BOOST_AUTO_TEST_CASE() [70/117]

BOOST_AUTO_TEST_CASE ( NuclTest  )

Definition at line 3664 of file seqdb_unit_test.cpp.

References CSeqDB::eUnknown, and s_CheckIdLookup().

◆ BOOST_AUTO_TEST_CASE() [71/117]

BOOST_AUTO_TEST_CASE ( Offset2OidBadOffset  )

Definition at line 1225 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, CSeqDB::eUnfilteredAll, and nr().

◆ BOOST_AUTO_TEST_CASE() [72/117]

BOOST_AUTO_TEST_CASE ( Offset2OidBadOid  )

Definition at line 1247 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, CSeqDB::eUnfilteredAll, and nr().

◆ BOOST_AUTO_TEST_CASE() [73/117]

BOOST_AUTO_TEST_CASE ( Offset2OidMonotony  )

◆ BOOST_AUTO_TEST_CASE() [74/117]

BOOST_AUTO_TEST_CASE ( OidAndGiLists  )

◆ BOOST_AUTO_TEST_CASE() [75/117]

BOOST_AUTO_TEST_CASE ( OidRanges  )

◆ BOOST_AUTO_TEST_CASE() [76/117]

BOOST_AUTO_TEST_CASE ( OidRewriting  )

◆ BOOST_AUTO_TEST_CASE() [77/117]

BOOST_AUTO_TEST_CASE ( OidToGiLookup  )

◆ BOOST_AUTO_TEST_CASE() [78/117]

BOOST_AUTO_TEST_CASE ( OpenWithBLASTDBEnv  )

Definition at line 1329 of file seqdb_unit_test.cpp.

References CSeqDB::eNucleotide, and CSeqDB::eProtein.

◆ BOOST_AUTO_TEST_CASE() [79/117]

BOOST_AUTO_TEST_CASE ( OpenWithoutBLASTDBEnv  )

Definition at line 1337 of file seqdb_unit_test.cpp.

References CSeqDB::eNucleotide, and CSeqDB::eProtein.

◆ BOOST_AUTO_TEST_CASE() [80/117]

BOOST_AUTO_TEST_CASE ( PartialSequences  )

Definition at line 2061 of file seqdb_unit_test.cpp.

References CSeqDB::eNucleotide, and s_TestPartialAmbig().

◆ BOOST_AUTO_TEST_CASE() [81/117]

BOOST_AUTO_TEST_CASE ( PathDelimiters  )

Definition at line 272 of file seqdb_unit_test.cpp.

References CSeqDB::eFilteredAll, CSeqDB::eProtein, and CSeqDB::GetTotals().

◆ BOOST_AUTO_TEST_CASE() [82/117]

BOOST_AUTO_TEST_CASE ( PdbIdWithChain  )

Definition at line 3683 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, and nr().

◆ BOOST_AUTO_TEST_CASE() [83/117]

BOOST_AUTO_TEST_CASE ( PigListSwissprot  )

◆ BOOST_AUTO_TEST_CASE() [84/117]

BOOST_AUTO_TEST_CASE ( ProtOldTest  )

Definition at line 3596 of file seqdb_unit_test.cpp.

References CSeqDB::eUnknown, and s_CheckIdLookup().

◆ BOOST_AUTO_TEST_CASE() [85/117]

BOOST_AUTO_TEST_CASE ( ProtTest  )

Definition at line 3619 of file seqdb_unit_test.cpp.

References CSeqDB::eUnknown, and s_CheckIdLookup().

◆ BOOST_AUTO_TEST_CASE() [86/117]

BOOST_AUTO_TEST_CASE ( ResolveDbPath  )

Definition at line 2318 of file seqdb_unit_test.cpp.

References ITERATE, and SeqDB_ResolveDbPath().

◆ BOOST_AUTO_TEST_CASE() [87/117]

BOOST_AUTO_TEST_CASE ( RestartWithVolumes  )

Definition at line 4012 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein.

◆ BOOST_AUTO_TEST_CASE() [88/117]

BOOST_AUTO_TEST_CASE ( SeqIdList  )

◆ BOOST_AUTO_TEST_CASE() [89/117]

BOOST_AUTO_TEST_CASE ( SeqIdListAndGiList  )

◆ BOOST_AUTO_TEST_CASE() [90/117]

BOOST_AUTO_TEST_CASE ( SeqidToOid  )

◆ BOOST_AUTO_TEST_CASE() [91/117]

BOOST_AUTO_TEST_CASE ( SharedMemoryMaps  )

◆ BOOST_AUTO_TEST_CASE() [92/117]

BOOST_AUTO_TEST_CASE ( SingleTaxidBlastDefLine  )

◆ BOOST_AUTO_TEST_CASE() [93/117]

BOOST_AUTO_TEST_CASE ( StringIdentSearch  )

◆ BOOST_AUTO_TEST_CASE() [94/117]

BOOST_AUTO_TEST_CASE ( SummaryDataN  )

◆ BOOST_AUTO_TEST_CASE() [95/117]

BOOST_AUTO_TEST_CASE ( SummaryDataP  )

◆ BOOST_AUTO_TEST_CASE() [96/117]

BOOST_AUTO_TEST_CASE ( TaxFilterWithGiListDB  )

◆ BOOST_AUTO_TEST_CASE() [97/117]

BOOST_AUTO_TEST_CASE ( Test_Mix_GI_SeqId_List_AliasFile  )

Definition at line 4268 of file seqdb_unit_test.cpp.

References CSeqDB::CheckOrFindOID(), CSeqDB::eProtein, and i.

◆ BOOST_AUTO_TEST_CASE() [98/117]

BOOST_AUTO_TEST_CASE ( Test_Mix_User_SeqIdList_AliasFile  )

◆ BOOST_AUTO_TEST_CASE() [99/117]

BOOST_AUTO_TEST_CASE ( Test_Multi_SeqIdList_AliasFile  )

Definition at line 4257 of file seqdb_unit_test.cpp.

References CSeqDB::CheckOrFindOID(), and CSeqDB::eProtein.

◆ BOOST_AUTO_TEST_CASE() [100/117]

BOOST_AUTO_TEST_CASE ( Test_SeqIdList_AliasFile  )

Definition at line 4224 of file seqdb_unit_test.cpp.

References CSeqDB::CheckOrFindOID(), and CSeqDB::eProtein.

◆ BOOST_AUTO_TEST_CASE() [101/117]

BOOST_AUTO_TEST_CASE ( Test_SeqIdList_FilteredID  )

Definition at line 4235 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, CSeqDB::GetSeqIDs(), ITERATE, and kEmptyStr.

◆ BOOST_AUTO_TEST_CASE() [102/117]

BOOST_AUTO_TEST_CASE ( TestDiskUsage  )

Definition at line 4032 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, and CSeqDB::GetDiskUsage().

◆ BOOST_AUTO_TEST_CASE() [103/117]

BOOST_AUTO_TEST_CASE ( TestMemoryMapFile  )

◆ BOOST_AUTO_TEST_CASE() [104/117]

BOOST_AUTO_TEST_CASE ( TestMemoryMapFile_MT  )

Definition at line 4495 of file seqdb_unit_test.cpp.

References CSeqDBAtlas::GetOpenedFilseCount(), and i.

◆ BOOST_AUTO_TEST_CASE() [105/117]

BOOST_AUTO_TEST_CASE ( TestOidNotFoundWithUserAliasFileAndGiList  )

◆ BOOST_AUTO_TEST_CASE() [106/117]

BOOST_AUTO_TEST_CASE ( TestResetInternalChunkBookmark  )

◆ BOOST_AUTO_TEST_CASE() [107/117]

BOOST_AUTO_TEST_CASE ( TestSpaceInDbName  )

Definition at line 4108 of file seqdb_unit_test.cpp.

References SDbSumInfo::CompareSelf(), and CSeqDB::eProtein.

◆ BOOST_AUTO_TEST_CASE() [108/117]

BOOST_AUTO_TEST_CASE ( TestTaxIdsLookup  )

◆ BOOST_AUTO_TEST_CASE() [109/117]

BOOST_AUTO_TEST_CASE ( TestTaxIdsLookup_v4  )

Definition at line 4541 of file seqdb_unit_test.cpp.

References CSeqDB::eProtein, and CSeqDB::GetTaxIdsForAccession().

◆ BOOST_AUTO_TEST_CASE() [110/117]

BOOST_AUTO_TEST_CASE ( TextUserGiList  )

Definition at line 1626 of file seqdb_unit_test.cpp.

References CSeqDB::CheckOrFindOID(), and CSeqDB::eProtein.

◆ BOOST_AUTO_TEST_CASE() [111/117]

BOOST_AUTO_TEST_CASE ( TotalLengths  )

◆ BOOST_AUTO_TEST_CASE() [112/117]

BOOST_AUTO_TEST_CASE ( TranslateIdents  )

Definition at line 838 of file seqdb_unit_test.cpp.

References ArraySize(), CSeqDB::eProtein, i, and nr().

◆ BOOST_AUTO_TEST_CASE() [113/117]

BOOST_AUTO_TEST_CASE ( TwoGiListsOneVolume  )

◆ BOOST_AUTO_TEST_CASE() [114/117]

BOOST_AUTO_TEST_CASE ( UserDefinedColumns  )

◆ BOOST_AUTO_TEST_CASE() [115/117]

BOOST_AUTO_TEST_CASE ( UserSeqIdList  )

◆ BOOST_AUTO_TEST_CASE() [116/117]

BOOST_AUTO_TEST_CASE ( ValidPath  )

Definition at line 325 of file seqdb_unit_test.cpp.

References CSeqDB::eFilteredAll, CSeqDB::eProtein, and CSeqDB::GetTotals().

◆ BOOST_AUTO_TEST_CASE() [117/117]

BOOST_AUTO_TEST_CASE ( VersionedSparseId  )

Definition at line 3786 of file seqdb_unit_test.cpp.

References CSeqDB::AccessionToOids(), and CSeqDB::eNucleotide.

◆ s_ApproxEqual()

template<class NUM , class DIF >
void s_ApproxEqual ( NUM  a,
NUM  b,
DIF  epsilon,
int  lineno 
)

Definition at line 212 of file seqdb_unit_test.cpp.

References a, b, epsilon, and lineno.

Referenced by BOOST_AUTO_TEST_CASE().

◆ s_BufHash()

static Uint4 s_BufHash ( const char *  buf_in,
Uint4  length,
Uint4  start = 1 
)
static

Definition at line 228 of file seqdb_unit_test.cpp.

References buf, and i.

Referenced by BOOST_AUTO_TEST_CASE().

◆ s_CheckIdLookup()

static void s_CheckIdLookup ( CSeqDB db,
const string acc,
size_t  exp_oids,
size_t  exp_size 
)
static

◆ s_DbHasOID()

static bool s_DbHasOID ( CSeqDB db,
int count,
int  oid 
)
static

Definition at line 2614 of file seqdb_unit_test.cpp.

References CSeqDB::CheckOrFindOID(), and count.

Referenced by BOOST_AUTO_TEST_CASE().

◆ s_MapAllGis()

static void s_MapAllGis ( CSeqDB db,
map< int, int > &  m,
int  change,
int total 
)
static

◆ s_MaskingTest()

static bool s_MaskingTest ( EMaskingType  mask,
unsigned  oid 
)
static

Definition at line 127 of file seqdb_unit_test.cpp.

References eAll, eEven, eOdd, ePrime, and mask.

Referenced by BOOST_AUTO_TEST_CASE(), and s_TestMaskingLimits().

◆ s_ModifyMap()

static void s_ModifyMap ( map< int, int > &  m,
int  key,
int  c,
int total 
)
static

◆ s_Stringify()

template<class ASNOBJ >
string s_Stringify ( CRef< ASNOBJ >  a)

Definition at line 247 of file seqdb_unit_test.cpp.

References a, and MSerial_AsnText.

Referenced by BOOST_AUTO_TEST_CASE().

◆ s_TestMaskingLimits()

static void s_TestMaskingLimits ( EMaskingType  mask,
unsigned  first,
unsigned  last,
unsigned  lowest,
unsigned  highest,
unsigned  count 
)
static

Definition at line 167 of file seqdb_unit_test.cpp.

References count, first(), i, last(), mask, and s_MaskingTest().

Referenced by BOOST_AUTO_TEST_CASE().

◆ s_TestPartialAmbig()

static void s_TestPartialAmbig ( CSeqDB db,
TGi  nt_gi 
)
static

◆ s_TestPartialAmbigRange()

static void s_TestPartialAmbigRange ( CSeqDB db,
int  oid,
int  begin,
int  end 
)
static

◆ s_ToString()

template<class A , class B , class C , class D , class E >
string s_ToString ( const A a,
const B b,
const C c,
const D d,
const E e 
)

Definition at line 66 of file seqdb_unit_test.cpp.

References a, and b.

Referenced by BOOST_AUTO_TEST_CASE(), and s_TestPartialAmbigRange().

◆ USING_SCOPE()

USING_SCOPE ( objects  )

Variable Documentation

◆ USING_NCBI_SCOPE

USING_NCBI_SCOPE

Definition at line 60 of file seqdb_unit_test.cpp.

Modified on Fri Sep 20 14:57:40 2024 by modify_doxy.py rev. 669887