Commit f277d731 authored by Martin Marinov's avatar Martin Marinov
Browse files

Write the checksum run level to the test report

parent 007c9278
......@@ -94,6 +94,7 @@ Difference Object::compare(
void Object::add(const Result& _rslt, const String& _data)
{
static Base::OutputStreamAdaptT<std::ofstream> test_str(REPORT_FILENAME);
static bool tag_out = false;
#ifdef DEB_ON
static String prev_call_stck;
......@@ -106,7 +107,11 @@ void Object::add(const Result& _rslt, const String& _data)
prev_call_stck = call_stck;
}
#endif//DEB_ON
if (!tag_out)
{
tag_out = true;
test_str << REPORT_LEVEL_TAG << LEVEL_TEXT[run_lvl] << Base::LF;
}
test_str << _rslt << " " << name() << ": " << _data << Base::LF;
}
......
......@@ -20,6 +20,7 @@ namespace Checksum {
//! Enumerate the checksum levels
enum Level { L_NONE, L_PRIME, L_ALL };
extern Level run_lvl; //<! The checksum run level
const char* const LEVEL_TEXT[3] = { "NONE", "PRIME", "ALL" };
//! typedef String, this is used a lot in this namespace
typedef std::string String;
......
......@@ -19,7 +19,7 @@ typedef boost::filesystem::path Path;
const char* const LOG_FILENAME = "out.txt";
const char* const REPORT_FILENAME = "report.txt";
const char* const REPORT_LEVEL_TAG = "Report Level: ";
}//namespace Test
#endif//TEST_ON
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment