35 #define BLAST_SECONDARY_SOURCE 1
43 using namespace blast;
61 BOOST_REQUIRE(m_SeqSrc !=
NULL);
91 BOOST_REQUIRE(rv ==
FALSE);
94 BOOST_REQUIRE(rv ==
FALSE);
104 void*
dummy = (
void*) &m_SeqSrc;
111 BOOST_REQUIRE(rv ==
NULL);
117 BOOST_REQUIRE(itr !=
NULL);
119 BOOST_REQUIRE(itr ==
NULL);
126 memset((
void*) &seq_arg, 0,
sizeof(seq_arg));
133 BOOST_REQUIRE(
i == 0);
139 BOOST_REQUIRE(seqsrc.
Get() !=
NULL);
141 BOOST_REQUIRE(error_str !=
NULL);
Contains C++ wrapper classes to structures in algo/blast/core as well as some auxiliary functions to ...
#define sfree(x)
Safe free a pointer: belongs to a higher level header.
#define BLAST_SEQSRC_ERROR
Error while retrieving sequence.
Int4 BlastSeqSrcIteratorNext(const BlastSeqSrc *seq_src, BlastSeqSrcIterator *itr)
Increments the BlastSeqSrcIterator.
BlastSeqSrcIterator * BlastSeqSrcIteratorFree(BlastSeqSrcIterator *itr)
Frees the BlastSeqSrcIterator structure.
Int4 BlastSeqSrcGetSeqLen(const BlastSeqSrc *seq_src, void *oid)
Retrieve sequence length (number of residues/bases)
Boolean BlastSeqSrcGetIsProt(const BlastSeqSrc *seq_src)
Find if the Blast Sequence Source contains protein or nucleotide sequences.
BlastSeqSrcIterator * BlastSeqSrcIteratorNew(void)
Allocate and initialize an iterator over a BlastSeqSrc with a default chunk size for MT-safe iteratio...
Int4 BlastSeqSrcGetAvgSeqLen(const BlastSeqSrc *seq_src)
Get the average length of all sequences in the sequence source.
char * BlastSeqSrcGetInitError(const BlastSeqSrc *seq_src)
Function to retrieve NULL terminated string containing the description of an initialization error or ...
Int4 BlastSeqSrcGetNumSeqs(const BlastSeqSrc *seq_src)
Get the number of sequences contained in the sequence source.
Int8 BlastSeqSrcGetTotLen(const BlastSeqSrc *seq_src)
Get the total length of all sequences in the sequence source.
BlastSeqSrc * BlastSeqSrcFree(BlastSeqSrc *seq_src)
Frees the BlastSeqSrc structure by invoking the destructor function set by the user-defined construct...
Int4 BlastSeqSrcGetMaxSeqLen(const BlastSeqSrc *seq_src)
Get the length of the longest sequence in the sequence source.
const char * BlastSeqSrcGetName(const BlastSeqSrc *seq_src)
Get the Blast Sequence source name (e.g.
Int2 BlastSeqSrcGetSequence(const BlastSeqSrc *seq_src, BlastSeqSrcGetSeqArg *getseq_arg)
Retrieve an individual sequence.
#define BLAST_SEQSRC_EOF
No more sequences available.
Wrapper class for BlastSeqSrcIterator .
Wrapper class for BlastSeqSrc .
static const char * str(char *buf, int n)
BlastSeqSrc * Get() const
int64_t Int8
8-byte (64-bit) signed integer
BOOST_AUTO_TEST_CASE(TestCreation)
constexpr bool empty(list< Ts... >) noexcept
Uint1 Boolean
bool replacment for C
#define FALSE
bool replacment for C indicating false.
BlastSeqSrc * MockBlastSeqSrcInit(EMockBlastSeqSrcMode mode)
Mock BlastSeqSrc initialization function.
Mock object which implements the BlastSeqSrc interface for testing purposes.
@ eMBSS_Invalid
Sets a limit on the number of valid mock modes.
@ eMBSS_AlwaysFail
returns failure on all operations
Structure used as the second argument to functions satisfying the GetSeqBlkFnPtr signature,...
Int4 oid
Oid in BLAST database, index in an array of sequences, etc [in].
Complete type definition of Blast Sequence Source Iterator.
Complete type definition of Blast Sequence Source ADT.
Initializes m_SeqSrc with a BlastSeqSrc that always fails.
~FailingMockSeqSrcTestFixture()
FailingMockSeqSrcTestFixture()
Utility stuff for more convenient using of Boost.Test library.