A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/unit__test__feature__edit_8cpp_source.html below:

NCBI C++ ToolKit: src/objmgr/util/unit_test/unit_test_feature_edit.cpp Source File

58

ifstream in_file(filename.c_str());

59

BOOST_REQUIRE(in_file.good());

70  return

feat1.

Equals

(feat2);

87

vector<string> vecRange;

89

BOOST_REQUIRE(vecRange.size() == 2);

100  const string

& extBaseline) :

108  if

(!dirEntry.

IsFile

()) {

114  const string

fileName =

file

.GetName();

119

vector<string> vecFilenamePieces;

121

BOOST_REQUIRE(vecFilenamePieces.size() == 3);

123  const string

testRange = vecFilenamePieces[1];

124

BOOST_REQUIRE(!testRange.empty());

126  const string

testName = vecFilenamePieces[0] +

"."

+ testRange ;

127

BOOST_REQUIRE(!testName.empty());

129  const string

fileType = vecFilenamePieces[2];

130

BOOST_REQUIRE(!fileType.empty());

133

(*m_pTestNameToInfoMap)[testName];

149

BOOST_FAIL(

"Unknown file type "

<< fileName <<

"."

);

164

cout <<

"Running feature-trim test\n"

;

166  if

(!testName.empty()) {

167

cerr <<

"Running "

<< testName <<

"\n"

;

176  const bool

success = trimmed_feat->

Equals

(*baseline);

184

BOOST_ERROR(

"Error: "

<< testName <<

" failed."

);

198

arg_descrs->AddDefaultKey(

"test-dir"

,

"TEST_FILE_DIRECTORY"

,

199  "Set the root directory under which all test files can be found."

,

203

arg_descrs->AddFlag(

"keep-diffs"

,

204  "Keep output files that differ from expected baseline."

,

217  const string

extBaseline(

"baseline"

);

221  CDir

test_cases_dir(args[

"test-dir"

].AsDirectory());

222

BOOST_REQUIRE_MESSAGE(test_cases_dir.

IsDir

(),

223  "Cannot find dir: "

<< test_cases_dir.

GetPath

());

226  const

vector<string> kEmptyStringVec;

229

&testNameToInfoMap,

extInput

, extBaseline);

239  const string

& testName = name_to_info_it->first;

240  const STestInfo

& testInfo = name_to_info_it->second;

241

cout <<

"Verifying: "

<< testName << endl;

249  const string

& testName = name_to_info_it->first;

250  const STestInfo

& testInfo = name_to_info_it->second;

static CNcbiApplication * Instance(void)

Singleton method.

namespace ncbi::objects::

CTestNameToInfoMapLoader(TTestNameToInfoMap *pTestNameToInfoMap, const string &extInput, const string &extBaseline)

TTestNameToInfoMap * m_pTestNameToInfoMap

void operator()(const CDirEntry &dirEntry)

static int RunTests(void)

Code to iterate through all tests to run.

unsigned int TSeqPos

Type for sequence locations and lengths.

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

@ eDirectory

Name of file directory.

void FindFilesInDir(const CDir &dir, const vector< string > &masks, const vector< string > &masks_subdir, TFindFunc &find_func, TFindFiles flags=fFF_Default)

Find files in the specified directory.

bool IsDir(EFollowLinks follow=eFollowLinks) const

Check whether a directory entry is a directory.

bool IsFile(EFollowLinks follow=eFollowLinks) const

Check whether a directory entry is a file.

const string & GetPath(void) const

Get entry path.

virtual bool Exists(void) const

Check existence of file.

@ fFF_Recursive

descend into sub-dirs

@ fFF_Default

default behavior

#define MSerial_AsnText

I/O stream manipulators –.

virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const

Check if both objects contain the same values.

static CRef< CObjectManager > GetInstance(void)

Return the existing object manager or create one.

CRef< C > Ref(C *object)

Helper functions to get CRef<> and CConstRef<> objects.

IO_PREFIX::ofstream CNcbiOfstream

Portable alias for ofstream.

static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to int.

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...

CRange< TSeqPos > m_Range

Utility stuff for more convenient using of Boost.Test library.

BOOST_AUTO_TEST_CASE(RunTests)

CRef< CSeq_feat > s_ReadFeat(const string &filename)

void sRunFeatureTrimTest(const string &testName, const STestInfo &testInfo, const bool keep)

CRange< TSeqPos > s_GetRangeFromString(const string &rangeString)

bool s_AreFeatsEqual(const CSeq_feat &feat1, const CSeq_feat &feat2)

const string dirTestFiles("feature_edit_test_cases")

NCBITEST_INIT_CMDLINE(arg_descrs)

const string extInput("find_its_output.tab")


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4