From 08fd005217fdd49f17c615969c6f6a0e782e51f0 Mon Sep 17 00:00:00 2001 From: Denes Matetelki Date: Sun, 14 Jul 2013 22:34:05 +0200 Subject: [PATCH] updating include paths --- build/CMakeLists.txt | 4 +- test/CMakeLists.txt | 52 ++++++++++----------- test/cpp_utils/Fixture.hpp | 2 +- test/cpp_utils/SimpleMessage.hpp | 2 +- test/cpp_utils/test_ArgParse.hpp | 4 +- test/cpp_utils/test_Common.hpp | 2 +- test/cpp_utils/test_ConditionalVariable.hpp | 4 +- test/cpp_utils/test_Connection.hpp | 2 +- test/cpp_utils/test_Logger.hpp | 2 +- test/cpp_utils/test_Message.hpp | 4 +- test/cpp_utils/test_Multiton.hpp | 4 +- test/cpp_utils/test_Mutex.hpp | 4 +- test/cpp_utils/test_ObjectPool.hpp | 6 +-- test/cpp_utils/test_ScopedLock.hpp | 3 +- test/cpp_utils/test_Semaphore.hpp | 7 +-- test/cpp_utils/test_StreamConnection.hpp | 2 +- test/cpp_utils/test_TcpConnection.hpp | 6 +-- test/cpp_utils/test_Thread.hpp | 8 ++-- test/cpp_utils/test_ThreadPool.hpp | 11 +++-- test/cpp_utils/test_Timer.hpp | 2 +- test/cpp_utils/test_timerUser.hpp | 2 +- 21 files changed, 68 insertions(+), 65 deletions(-) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index b28fa26..5c9a9f3 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -8,8 +8,8 @@ set (CXX_FLAGS "-Wall -Wextra -pedantic -Weffc++ -Wshadow " "-ggdb -fprofile-arcs -ftest-coverage -std=c++0x") add_definitions( ${CXX_FLAGS} ) -include_directories (../include) -aux_source_directory(../src CPP_UTILS_LIB_SOURCES) +include_directories (../lib/cpp_utils/) +aux_source_directory(../lib/cpp_utils/ CPP_UTILS_LIB_SOURCES) add_library (CppUtils SHARED ${CPP_UTILS_LIB_SOURCES}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b89b025..b7b6fec 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -13,40 +13,40 @@ if(CXXTEST_FOUND) set(CXXTEST_USE_PERL TRUE) # set(CXXTEST_TESTGEN_ARGS "") - include_directories(${CXXTEST_INCLUDE_DIR} ../include) + include_directories(${CXXTEST_INCLUDE_DIR} ../lib/) enable_testing() CXXTEST_ADD_TEST(testCppUtils generated_main.cpp - Fixture.hpp - - test_Logger.hpp - test_ArgParse.hpp - test_Common.hpp - test_ConditionalVariable.hpp - test_Multiton.hpp - test_Mutex.hpp - test_ObjectPool.hpp - test_ScopedLock.hpp - test_Semaphore.hpp -# test_Singleton_DCLP.hpp -# test_Singleton_call_once.hpp - # test_Singleton.hpp Cannot test private member, Ficture.hpp loads it -# test_Singleton_meyers.hpp - test_Thread.hpp - test_ThreadPool.hpp - - test_timerUser.hpp - test_Timer.hpp - test_Connection.hpp - test_StreamConnection.hpp - test_TcpConnection.hpp - test_Message.hpp + cpp_utils/Fixture.hpp + + cpp_utils/test_Logger.hpp + cpp_utils/test_ArgParse.hpp + cpp_utils/test_Common.hpp + cpp_utils/test_ConditionalVariable.hpp + cpp_utils/test_Multiton.hpp + cpp_utils/test_Mutex.hpp + cpp_utils/test_ObjectPool.hpp + cpp_utils/test_ScopedLock.hpp + cpp_utils/test_Semaphore.hpp +# cpp_utils/test_Singleton_DCLP.hpp +# cpp_utils/test_Singleton_call_once.hpp + # cpp_utils/test_Singleton.hpp Cannot test private member, Ficture.hpp loads it +# cpp_utils/test_Singleton_meyers.hpp + cpp_utils/test_Thread.hpp + cpp_utils/test_ThreadPool.hpp + + cpp_utils/test_timerUser.hpp + cpp_utils/test_Timer.hpp + cpp_utils/test_Connection.hpp + cpp_utils/test_StreamConnection.hpp + cpp_utils/test_TcpConnection.hpp + cpp_utils/test_Message.hpp ) target_link_libraries(testCppUtils CppUtils gcov) endif() add_custom_target( test - COMMAND ./run_test.sh ./testCppUtils + COMMAND ./tools/run_test.sh ./testCppUtils DEPENDS testCppUtils ) diff --git a/test/cpp_utils/Fixture.hpp b/test/cpp_utils/Fixture.hpp index e4e4c54..70dd11d 100644 --- a/test/cpp_utils/Fixture.hpp +++ b/test/cpp_utils/Fixture.hpp @@ -4,7 +4,7 @@ #include #include -#include "Common.hpp" +#include #include class TestFixture : public CxxTest::GlobalFixture diff --git a/test/cpp_utils/SimpleMessage.hpp b/test/cpp_utils/SimpleMessage.hpp index 1dbb3e4..d696b25 100644 --- a/test/cpp_utils/SimpleMessage.hpp +++ b/test/cpp_utils/SimpleMessage.hpp @@ -1,7 +1,7 @@ #ifndef SIMPLEMESSAGE_HPP #define SIMPLEMESSAGE_HPP -#include "Message.hpp" +#include class SimpleMessage : public Message { diff --git a/test/cpp_utils/test_ArgParse.hpp b/test/cpp_utils/test_ArgParse.hpp index 40cdaf1..5e7f966 100644 --- a/test/cpp_utils/test_ArgParse.hpp +++ b/test/cpp_utils/test_ArgParse.hpp @@ -1,11 +1,11 @@ #include -#include "Common.hpp" +#include #include "Fixture.hpp" #define private public -#include "ArgParse.hpp" +#include #include #include diff --git a/test/cpp_utils/test_Common.hpp b/test/cpp_utils/test_Common.hpp index e7cd038..f596f56 100644 --- a/test/cpp_utils/test_Common.hpp +++ b/test/cpp_utils/test_Common.hpp @@ -1,7 +1,7 @@ #include #include "Fixture.hpp" -#include "Common.hpp" +#include #include // timespec diff --git a/test/cpp_utils/test_ConditionalVariable.hpp b/test/cpp_utils/test_ConditionalVariable.hpp index 9eab96b..3554b91 100644 --- a/test/cpp_utils/test_ConditionalVariable.hpp +++ b/test/cpp_utils/test_ConditionalVariable.hpp @@ -1,7 +1,7 @@ #include -#include "Mutex.hpp" -#include "ConditionVariable.hpp" +#include +#include class TestConditionVariable : public CxxTest::TestSuite diff --git a/test/cpp_utils/test_Connection.hpp b/test/cpp_utils/test_Connection.hpp index e5211a1..c73b2e3 100644 --- a/test/cpp_utils/test_Connection.hpp +++ b/test/cpp_utils/test_Connection.hpp @@ -2,7 +2,7 @@ #include "Fixture.hpp" -#include "Connection.hpp" +#include class TestConnection : public CxxTest::TestSuite { diff --git a/test/cpp_utils/test_Logger.hpp b/test/cpp_utils/test_Logger.hpp index 6290266..be704fd 100644 --- a/test/cpp_utils/test_Logger.hpp +++ b/test/cpp_utils/test_Logger.hpp @@ -1,6 +1,6 @@ #include -#include "Common.hpp" +#include #include "Fixture.hpp" diff --git a/test/cpp_utils/test_Message.hpp b/test/cpp_utils/test_Message.hpp index 0f3c6c3..5ee0341 100644 --- a/test/cpp_utils/test_Message.hpp +++ b/test/cpp_utils/test_Message.hpp @@ -2,9 +2,9 @@ #include "Fixture.hpp" -#include "Message.hpp" +#include #include "SimpleMessage.hpp" -#include "Connection.hpp" +#include class TestMessage : public CxxTest::TestSuite diff --git a/test/cpp_utils/test_Multiton.hpp b/test/cpp_utils/test_Multiton.hpp index decd5a8..16daa84 100644 --- a/test/cpp_utils/test_Multiton.hpp +++ b/test/cpp_utils/test_Multiton.hpp @@ -1,8 +1,8 @@ #include -#include "Common.hpp" +#include #include "Fixture.hpp" -#include "Multiton.hpp" +#include class TestMultitonSuite : public CxxTest::TestSuite diff --git a/test/cpp_utils/test_Mutex.hpp b/test/cpp_utils/test_Mutex.hpp index cafa78e..5d079c4 100644 --- a/test/cpp_utils/test_Mutex.hpp +++ b/test/cpp_utils/test_Mutex.hpp @@ -1,8 +1,8 @@ #include -#include "Common.hpp" +#include #include "Fixture.hpp" -#include "Mutex.hpp" +#include #include // EDEADLK, EPERM, ETIMEDOUT diff --git a/test/cpp_utils/test_ObjectPool.hpp b/test/cpp_utils/test_ObjectPool.hpp index ad85533..e7c4a07 100644 --- a/test/cpp_utils/test_ObjectPool.hpp +++ b/test/cpp_utils/test_ObjectPool.hpp @@ -2,11 +2,11 @@ #include -#include "Common.hpp" +#include #include "Fixture.hpp" -#include "ObjectPool.hpp" -#include "Thread.hpp" +#include +#include class TestObjectPool : public CxxTest::TestSuite { diff --git a/test/cpp_utils/test_ScopedLock.hpp b/test/cpp_utils/test_ScopedLock.hpp index c74e8d7..7494b22 100644 --- a/test/cpp_utils/test_ScopedLock.hpp +++ b/test/cpp_utils/test_ScopedLock.hpp @@ -1,6 +1,7 @@ #include -#include "ScopedLock.hpp" +#include + #include "Fixture.hpp" diff --git a/test/cpp_utils/test_Semaphore.hpp b/test/cpp_utils/test_Semaphore.hpp index c8d39b0..88bb7b0 100644 --- a/test/cpp_utils/test_Semaphore.hpp +++ b/test/cpp_utils/test_Semaphore.hpp @@ -1,8 +1,9 @@ #include -#include "Semaphore.hpp" -#include "Thread.hpp" -#include "Common.hpp" +#include +#include +#include + #include "Fixture.hpp" class TestSemaphore : public CxxTest::TestSuite diff --git a/test/cpp_utils/test_StreamConnection.hpp b/test/cpp_utils/test_StreamConnection.hpp index 69e6ce1..e50a988 100644 --- a/test/cpp_utils/test_StreamConnection.hpp +++ b/test/cpp_utils/test_StreamConnection.hpp @@ -2,7 +2,7 @@ #include "Fixture.hpp" -#include "StreamConnection.hpp" +#include class TestStreamConnection : public CxxTest::TestSuite { diff --git a/test/cpp_utils/test_TcpConnection.hpp b/test/cpp_utils/test_TcpConnection.hpp index c3fa13f..bebfb23 100644 --- a/test/cpp_utils/test_TcpConnection.hpp +++ b/test/cpp_utils/test_TcpConnection.hpp @@ -4,11 +4,11 @@ #include "Fixture.hpp" -#include "Thread.hpp" -#include "TcpConnection.hpp" +#include +#include #include "SimpleMessage.hpp" -#include "SocketClient.hpp" +#include class TestTcpConnection : public CxxTest::TestSuite { diff --git a/test/cpp_utils/test_Thread.hpp b/test/cpp_utils/test_Thread.hpp index 5ebf331..53106fc 100644 --- a/test/cpp_utils/test_Thread.hpp +++ b/test/cpp_utils/test_Thread.hpp @@ -2,10 +2,10 @@ #include "Fixture.hpp" -#include "Thread.hpp" -#include "Common.hpp" -#include "Mutex.hpp" -#include "ScopedLock.hpp" +#include +#include +#include +#include #include // malloc #include // SIGINT diff --git a/test/cpp_utils/test_ThreadPool.hpp b/test/cpp_utils/test_ThreadPool.hpp index a60e349..ad6042f 100644 --- a/test/cpp_utils/test_ThreadPool.hpp +++ b/test/cpp_utils/test_ThreadPool.hpp @@ -1,10 +1,11 @@ #include -#include "Task.hpp" -#include "Thread.hpp" -#include "WorkerThread.hpp" -#include "ThreadPool.hpp" -#include "Common.hpp" +#include +#include +#include +#include +#include + #include "Fixture.hpp" diff --git a/test/cpp_utils/test_Timer.hpp b/test/cpp_utils/test_Timer.hpp index ef36340..89ec41c 100644 --- a/test/cpp_utils/test_Timer.hpp +++ b/test/cpp_utils/test_Timer.hpp @@ -2,7 +2,7 @@ #include "Fixture.hpp" -#include "Timer.hpp" +#include class TestTimer : public CxxTest::TestSuite diff --git a/test/cpp_utils/test_timerUser.hpp b/test/cpp_utils/test_timerUser.hpp index 19c9c00..e0f8224 100644 --- a/test/cpp_utils/test_timerUser.hpp +++ b/test/cpp_utils/test_timerUser.hpp @@ -4,7 +4,7 @@ #define protected public -#include "Timer.hpp" +#include class TestTimerUser : public CxxTest::TestSuite