Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2017-01-04 20:07:12 +0000
committerHenrik Rentz-Reichert2017-01-09 16:41:16 +0000
commit9b02d5a62ea41136b46b744f7b2c1cf50f30a888 (patch)
treed7473847da1a9e3a470195f384f62322b48057db /tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp
parentb8fd69cd558c0673971bcdaea495131bc4d7cd82 (diff)
downloadorg.eclipse.etrice-9b02d5a62ea41136b46b744f7b2c1cf50f30a888.tar.gz
org.eclipse.etrice-9b02d5a62ea41136b46b744f7b2c1cf50f30a888.tar.xz
org.eclipse.etrice-9b02d5a62ea41136b46b744f7b2c1cf50f30a888.zip
Bug 509875 - [runtime.cpp] replace STL containers with own containers that are more light weight
* replaced streaming code with (s)printf constructs * added String, Vector, Set, Pair and Map with tests * using new String class in * Address * Message * MSCFilter * MSCLogger * RTObject * and affected classes * using new Vector class in * RTObject * MSCLogger * MessageServiceController * ReplicatedActorClassBase * ReplicatedInterfaceItemBase * and affected classes * using new Set class in * MessageDispatcher * using new Map class in * SubSystemClassBase * DebuggingService * adjusted cpp generator Change-Id: I9c91289057185e6e36b9453ecf03f6f6d3834ec6
Diffstat (limited to 'tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp')
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp50
1 files changed, 29 insertions, 21 deletions
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp
index 7a53e2fc9..b04d03034 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp
@@ -16,6 +16,7 @@
#include "common/messaging/RTServices.h"
#include "common/messaging/StaticMessageMemory.h"
#include "etUnit/etUnit.h"
+#include <iostream>
using namespace etRuntime;
@@ -61,47 +62,54 @@ void DebuggingServiceTest::testLogging() {
RTServices::getInstance().getMsgSvcCtrl().stop();
const char* failMsg = "DebuggingServiceTest failed";
- std::list<std::string>& result = dbgSvc.getAsyncLogger().getCommandList();
+ Vector<String>& result = dbgSvc.getAsyncLogger().getCommandList();
+
+ typedef Vector<String> CmdList;
+ for (CmdList::iterator it=result.begin(); it!=result.end(); ++it) {
+ std::cout << (*it).c_str() << std::endl;
+ }
+
+ Vector<String>::iterator it = result.begin();
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare(
+ 0==(*it).compare(
"\t/TestSubSystem (!) /TestSubSystem/TestActor1 "));
- result.pop_front();
+ ++it;
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare(
+ 0==(*it).compare(
"\t/TestSubSystem (!) /TestSubSystem/TestActor2 "));
- result.pop_front();
+ ++it;
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare(
+ 0==(*it).compare(
"\t/TestSubSystem/TestActor1 (!) /TestSubSystem/TestActor1/SubActor "));
- result.pop_front();
+ ++it;
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare(
+ 0==(*it).compare(
"\t/TestSubSystem/TestActor1 >-- /TestSubSystem/TestActor2 MessageAsync"));
- result.pop_front();
+ ++it;
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare(
+ 0==(*it).compare(
"\t/TestSubSystem/TestActor1 --> /TestSubSystem/TestActor2 MessageAsync"));
- result.pop_front();
+ ++it;
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare(
+ 0==(*it).compare(
"\t/TestSubSystem/TestActor1 ==> /TestSubSystem/TestActor2 MessageSyncCall"));
- result.pop_front();
+ ++it;
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare(
+ 0==(*it).compare(
"\t/TestSubSystem/TestActor1 <== /TestSubSystem/TestActor2 MessageSyncReturn"));
- result.pop_front();
+ ++it;
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare(
+ 0==(*it).compare(
"\t/TestSubSystem/TestActor1 >>> TestState"));
- result.pop_front();
+ ++it;
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare(
+ 0==(*it).compare(
"\t/TestSubSystem (X) /TestSubSystem/TestActor1 "));
- result.pop_front();
+ ++it;
EXPECT_TRUE(m_caseId, failMsg,
- !result.front().compare("# This is a comment"));
- result.pop_front();
+ 0==(*it).compare("# This is a comment"));
+ ++it;
}

Back to the top