From ad0c452e9890a35a1b7a6c2e2421e092c5cf2c2d Mon Sep 17 00:00:00 2001 From: christian mueller Date: Mon, 30 Jan 2012 18:38:07 +0100 Subject: * wrapping DLT calls in a new Class because of performance, codesize and lazyness reasons * the whole project now compiles without a warning with -pedantic --- PluginRoutingInterfaceAsync/test/CMakeLists.txt | 2 ++ PluginRoutingInterfaceAsync/test/mocklnterfaces.h | 4 ++-- PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp | 8 ++------ PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.h | 1 - .../test/testRoutingInterfaceAsyncInterrupt.cpp | 8 ++------ 5 files changed, 8 insertions(+), 15 deletions(-) (limited to 'PluginRoutingInterfaceAsync/test') diff --git a/PluginRoutingInterfaceAsync/test/CMakeLists.txt b/PluginRoutingInterfaceAsync/test/CMakeLists.txt index 5f61232..c060a71 100644 --- a/PluginRoutingInterfaceAsync/test/CMakeLists.txt +++ b/PluginRoutingInterfaceAsync/test/CMakeLists.txt @@ -52,6 +52,7 @@ INCLUDE_DIRECTORIES( file(GLOB ASYNC_PLUGIN_INTERFACE_SRCS_CXX "../../AudioManagerDaemon/src/SocketHandler.cpp" "../../AudioManagerDaemon/src/RoutingSender.cpp" + "../../AudioManagerDaemon/src/DLTWrapper.cpp" "../src/*.cpp" "testRoutingInterfaceAsync.cpp" ) @@ -59,6 +60,7 @@ file(GLOB ASYNC_PLUGIN_INTERFACE_SRCS_CXX file(GLOB ASYNC_PLUGIN_INTERFACE_INTERRUPT_SRCS_CXX "../../AudioManagerDaemon/src/SocketHandler.cpp" "../../AudioManagerDaemon/src/RoutingSender.cpp" + "../../AudioManagerDaemon/src/DLTWrapper.cpp" "../src/*.cpp" "testRoutingInterfaceAsyncInterrupt.cpp" diff --git a/PluginRoutingInterfaceAsync/test/mocklnterfaces.h b/PluginRoutingInterfaceAsync/test/mocklnterfaces.h index 9241dc0..c3caa46 100644 --- a/PluginRoutingInterfaceAsync/test/mocklnterfaces.h +++ b/PluginRoutingInterfaceAsync/test/mocklnterfaces.h @@ -82,9 +82,9 @@ class MockRoutingReceiveInterface : public RoutingReceiveInterface { MOCK_METHOD1(deregisterCrossfader, am_Error_e(const am_crossfaderID_t crossfaderID)); MOCK_METHOD2(peekSourceClassID, - am_Error_e(const std::string name, const am_sourceClass_t& sourceClassID)); + am_Error_e(const std::string& name, const am_sourceClass_t& sourceClassID)); MOCK_METHOD2(peekSinkClassID, - am_Error_e(const std::string name, const am_sinkClass_t& sinkClassID)); + am_Error_e(const std::string& name, const am_sinkClass_t& sinkClassID)); MOCK_METHOD2(hookInterruptStatusChange, void(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)); MOCK_METHOD1(hookDomainRegistrationComplete, diff --git a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp index fe74f42..c252e07 100644 --- a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp +++ b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp @@ -24,12 +24,11 @@ #include "testRoutingInterfaceAsync.h" #include "config.h" +#include "DLTWrapper.h" using namespace am; using namespace testing; -DLT_DECLARE_CONTEXT(DLT_CONTEXT) - std::vector testRoutingInterfaceAsync::pListRoutingPluginDirs = returnListPlugins(); am_domainID_t testRoutingInterfaceAsync::mDomainIDCount = 0; RoutingSender testRoutingInterfaceAsync::pRoutingSender = RoutingSender(pListRoutingPluginDirs); @@ -47,9 +46,7 @@ testRoutingInterfaceAsync::~testRoutingInterfaceAsync() void testRoutingInterfaceAsync::SetUp() { - DLT_REGISTER_APP("DPtest", "RoutingInterfacetest"); - DLT_REGISTER_CONTEXT(DLT_CONTEXT, "Main", "Main Context"); - DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("RoutingSendInterface Test started ")); + logInfo("RoutingSendInterface Test started "); std::vector domainIDs; domainIDs.push_back(0); @@ -113,7 +110,6 @@ void am::testRoutingInterfaceAsync::timerCallback(sh_timerHandle_t handle, void void testRoutingInterfaceAsync::TearDown() { - DLT_UNREGISTER_CONTEXT(DLT_CONTEXT); } TEST_F(testRoutingInterfaceAsync,setDomainState) diff --git a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.h b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.h index ecb5bad..364100c 100644 --- a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.h +++ b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.h @@ -27,7 +27,6 @@ #include #include -#include #include "mocklnterfaces.h" #include "SocketHandler.h" #include "../../AudioManagerDaemon/include/RoutingSender.h" diff --git a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsyncInterrupt.cpp b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsyncInterrupt.cpp index 9f40230..f8ece51 100644 --- a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsyncInterrupt.cpp +++ b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsyncInterrupt.cpp @@ -26,12 +26,11 @@ #include "testRoutingInterfaceAsync.h" #include "config.h" +#include "DLTWrapper.h" using namespace am; using namespace testing; -DLT_DECLARE_CONTEXT(DLT_CONTEXT) - std::vector testRoutingInterfaceAsync::pListRoutingPluginDirs = returnListPlugins(); am_domainID_t testRoutingInterfaceAsync::mDomainIDCount = 0; RoutingSender testRoutingInterfaceAsync::pRoutingSender = RoutingSender(pListRoutingPluginDirs); @@ -49,9 +48,7 @@ testRoutingInterfaceAsync::~testRoutingInterfaceAsync() void testRoutingInterfaceAsync::SetUp() { - DLT_REGISTER_APP("DPtest", "RoutingInterfacetest"); - DLT_REGISTER_CONTEXT(DLT_CONTEXT, "Main", "Main Context"); - DLT_LOG(DLT_CONTEXT, DLT_LOG_INFO, DLT_STRING("RoutingSendInterface Test started ")); + logInfo("RoutingSendInterface Test started "); std::vector domainIDs; domainIDs.push_back(0); @@ -115,7 +112,6 @@ void testRoutingInterfaceAsync::timerCallback(sh_timerHandle_t handle, void *use void testRoutingInterfaceAsync::TearDown() { - DLT_UNREGISTER_CONTEXT(DLT_CONTEXT); } std::string DBUSCOMMAND = "dbus-send --session --print-reply --dest=org.genivi.test /org/genivi/test org.genivi.test."; -- cgit v1.2.1