Skip to content
Snippets Groups Projects
Commit 30046535 authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[unitTesting] Testing sendMsg with __FILE__ and __LINE__

The logger is implemented with a map using __FILE__ and __LINE__.
Using the defaut values means that the same counter is used for
all the streams. This is jeopardizing the test.
parent cff9c8e7
No related branches found
No related tags found
No related merge requests found
......@@ -57,15 +57,24 @@ namespace dynamicgraph
std::ostringstream oss;
oss << "start update " << res;
sendMsg(oss.str().c_str(),MSG_TYPE_ERROR);
sendMsg("This is a message of level MSG_TYPE_DEBUG",MSG_TYPE_DEBUG);
sendMsg("This is a message of level MSG_TYPE_INFO",MSG_TYPE_INFO);
sendMsg("This is a message of level MSG_TYPE_WARNING",MSG_TYPE_WARNING);
sendMsg("This is a message of level MSG_TYPE_ERROR",MSG_TYPE_ERROR);
sendMsg("This is a message of level MSG_TYPE_DEBUG_STREAM",MSG_TYPE_DEBUG_STREAM);
sendMsg("This is a message of level MSG_TYPE_INFO_STREAM",MSG_TYPE_INFO_STREAM);
sendMsg("This is a message of level MSG_TYPE_WARNING_STREAM",MSG_TYPE_WARNING_STREAM);
sendMsg("This is a message of level MSG_TYPE_ERROR_STREAM",MSG_TYPE_ERROR_STREAM);
sendMsg("end update",MSG_TYPE_ERROR);
sendMsg("This is a message of level MSG_TYPE_DEBUG",
MSG_TYPE_DEBUG,__FILE__,__LINE__);
sendMsg("This is a message of level MSG_TYPE_INFO",
MSG_TYPE_INFO,__FILE__,__LINE__);
sendMsg("This is a message of level MSG_TYPE_WARNING",
MSG_TYPE_WARNING,__FILE__,__LINE__);
sendMsg("This is a message of level MSG_TYPE_ERROR",
MSG_TYPE_ERROR,__FILE__,__LINE__);
sendMsg("This is a message of level MSG_TYPE_DEBUG_STREAM",
MSG_TYPE_DEBUG_STREAM,__FILE__,__LINE__);
sendMsg("This is a message of level MSG_TYPE_INFO_STREAM",
MSG_TYPE_INFO_STREAM,__FILE__,__LINE__);
sendMsg("This is a message of level MSG_TYPE_WARNING_STREAM",
MSG_TYPE_WARNING_STREAM,__FILE__,__LINE__);
sendMsg("This is a message of level MSG_TYPE_ERROR_STREAM",
MSG_TYPE_ERROR_STREAM,__FILE__,__LINE__);
sendMsg("end update",
MSG_TYPE_ERROR,__FILE__,__LINE__);
return res;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment