16 #define VP_DEBUG_MODE 50 17 #define VP_TEMPLATE_DEBUG_MODE 50 21 #define BOOST_TEST_MODULE debug - trace 23 #if BOOST_VERSION >= 105900 24 #include <boost/test/tools/output_test_stream.hpp> 26 #include <boost/test/output_test_stream.hpp> 28 #include <boost/test/unit_test.hpp> 30 using boost::test_tools::output_test_stream;
50 dgDEBUG(5) <<
"Here is a test" << std::endl;
72 output_test_stream output;
73 std::fstream the_debug_file;
79 std::ostringstream oss_debug_file;
80 while (std::getline(the_debug_file, astr)) {
81 std::size_t found = astr.find(
":");
82 std::string asubstr = astr.substr(found + 1, astr.length());
83 found = asubstr.find(
":");
84 std::string asubstr2 = asubstr.substr(found + 1, astr.length());
85 oss_debug_file << asubstr2;
88 the_debug_file.close();
91 std::string str_to_test =
96 bool two_sub_string_identical;
99 two_sub_string_identical = str_to_test == oss_debug_file.str();
101 BOOST_CHECK(two_sub_string_identical);
This class represents an entity, i.e. a generic computational unit that provides input and output sig...
#define dgDEBUGOUT(level)
static const char * DEBUG_FILENAME_DEFAULT
#define dgDEBUGINOUT(level)
static void openFile(const char *filename=DEBUG_FILENAME_DEFAULT)
static const std::string CLASS_NAME
static void closeFile(const char *filename=DEBUG_FILENAME_DEFAULT)
BOOST_AUTO_TEST_CASE(testDebugTrace)
virtual const std::string & getClassName() const
CustomEntity(const std::string &n)
Entity(const std::string &name)
Entity * newEntity(const std::string &classname, const std::string &objname) const
Instantiate (and allocate) an entity.
static FactoryStorage * getInstance()
Get pointer to unique object of the class.
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(CustomEntity, "CustomEntity")
DYNAMIC_GRAPH_DLLAPI DebugTrace dgDEBUGFLOW
#define dgDEBUGIN(level)
VP_DEBUG.