49 string test_data_dir {
"test_data"};
51 unique_ptr<Parser> pConfig(
new Parser());
59 string inputFile = filestub +
".gb";
60 BOOST_REQUIRE(
CDirEntry(inputFile).Exists());
62 auto pIstr = make_unique<CNcbiIfstream>(inputFile);
64 auto pResult = ffparser.
Parse(*pConfig, *pIstr);
65 BOOST_REQUIRE(pResult.NotNull());
72 CFile goldenFile(filestub +
".asn");
73 BOOST_REQUIRE(goldenFile.
Exists());
79 if (args[
"keep-diffs"]) {
81 outputFile.
Copy(filestub +
".istr_interface");
85 BOOST_REQUIRE(success);
91 string test_data_dir {
"test_data"};
93 unique_ptr<Parser> pConfig(
new Parser());
101 string inputFile = filestub +
".gb";
102 BOOST_REQUIRE(
CDirEntry(inputFile).Exists());
105 auto pResult = ffparser.
Parse(*pConfig, inputFile);
106 BOOST_REQUIRE(pResult.NotNull());
113 CFile goldenFile(filestub +
".asn");
114 BOOST_REQUIRE(goldenFile.
Exists());
120 if (args[
"keep-diffs"]) {
122 outputFile.
Copy(filestub +
".file_interface");
126 BOOST_REQUIRE(success);
131 string test_data_dir {
"test_data"};
133 unique_ptr<Parser> pConfig(
new Parser());
141 string inputFile = filestub +
".embl";
142 BOOST_REQUIRE(
CDirEntry(inputFile).Exists());
145 auto pResult = ffparser.
Parse(*pConfig, inputFile);
146 BOOST_REQUIRE(pResult.NotNull());
153 CFile goldenFile(filestub +
".asn");
154 BOOST_REQUIRE(goldenFile.
Exists());
160 if (args[
"keep-diffs"]) {
162 outputFile.
Copy(filestub +
".new");
166 BOOST_REQUIRE(success);
172 argDescrs->AddFlag(
"keep-diffs",
173 "Keep output files that are different from expected.",
CRef< CSerialObject > Parse(Parser &parseInfo)
static CNcbiApplication * Instance(void)
Singleton method.
NCBITEST_INIT_CMDLINE(argDescrs)
BOOST_AUTO_TEST_CASE(TestIstreamInterface)
bool fta_set_format_source(Parser &pp, const std::string &format, const std::string &source)
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
bool CompareTextContents(const string &file, ECompareText mode, size_t buf_size=0) const
Compare files contents in text form.
static string GetTmpName(ETmpFileCreationMode mode=eTmpFileGetName)
Get temporary file name.
static string ConcatPath(const string &first, const string &second)
Concatenate two parts of the path for the current OS.
virtual bool Copy(const string &new_path, TCopyFlags flags=fCF_Default, size_t buf_size=0) const
Copy the entry to a location specified by "new_path".
virtual bool Exists(void) const
Check existence of file.
#define MSerial_AsnText
I/O stream manipulators –.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
const CharType(& source)[N]
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
Utility stuff for more convenient using of Boost.Test library.