Move src to UnitTest++ and move src/tests to tests.

CMakeLists was modified to support this, then include paths for the
test executable also had to be modified to include UnitTest++.
This commit is contained in:
Patrick Johnmeyer 2013-02-20 00:22:14 -06:00
parent deb7e2736d
commit 859e6250d2
78 changed files with 59 additions and 59 deletions

View file

@ -4,8 +4,8 @@ project(UnitTest++)
option(UTPP_USE_PLUS_SIGN "Set this to OFF is you with to use '-cpp' instead of '++' in lib/include paths" ON)
# get the main sources
file(GLOB headers_ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/*.h)
file(GLOB sources_ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/*.cpp)
file(GLOB headers_ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} UnitTest++/*.h)
file(GLOB sources_ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} UnitTest++/*.cpp)
source_group("" FILES ${headers_} ${sources_})
# get platform specific sources
@ -15,8 +15,8 @@ else()
set(platformDir_ Posix)
endif(WIN32)
file(GLOB platformHeaders_ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/${platformDir_}/*.h)
file(GLOB platformSources_ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/${platformDir_}/*.cpp)
file(GLOB platformHeaders_ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} UnitTest++/${platformDir_}/*.h)
file(GLOB platformSources_ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} UnitTest++/${platformDir_}/*.cpp)
source_group(${platformDir_} FILES ${platformHeaders_} ${platformSources_})
# create the lib
@ -26,12 +26,12 @@ if(${UTPP_USE_PLUS_SIGN})
set_target_properties(UnitTestPP PROPERTIES OUTPUT_NAME UnitTest++)
endif()
include_directories(src)
# build the test runner
file(GLOB TEST_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/tests/*.cpp src/tests/*.h)
file(GLOB TEST_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} tests/*.cpp tests/*.h)
source_group( "" FILES ${TEST_SRCS})
add_executable(TestUnitTestPP ${TEST_SRCS})
include_directories(UnitTest++)
if(${UTPP_USE_PLUS_SIGN})
set_target_properties(TestUnitTestPP PROPERTIES OUTPUT_NAME TestUnitTest++)

View file

@ -1,4 +1,4 @@
#include "../../src/UnitTestPP.h"
#include "UnitTest++/UnitTestPP.h"
int main(int, char const *[])
{

View file

@ -1,10 +1,10 @@
#ifndef UNITTEST_RECORDINGREPORTER_H
#define UNITTEST_RECORDINGREPORTER_H
#include "../TestReporter.h"
#include "UnitTest++/TestReporter.h"
#include <cstring>
#include "../TestDetails.h"
#include "UnitTest++/TestDetails.h"
struct RecordingReporter : public UnitTest::TestReporter
{

View file

@ -1,7 +1,7 @@
#ifndef UNITTEST_SCOPEDCURRENTTEST_H
#define UNITTEST_SCOPEDCURRENTTEST_H
#include "../CurrentTest.h"
#include "UnitTest++/CurrentTest.h"
#include <cstddef>
class ScopedCurrentTest

View file

@ -1,9 +1,9 @@
#include "../Config.h"
#include "../../src/UnitTestPP.h"
#include "UnitTest++/Config.h"
#include "UnitTest++/UnitTestPP.h"
#include "../ReportAssert.h"
#include "../ReportAssertImpl.h"
#include "../AssertException.h"
#include "UnitTest++/ReportAssert.h"
#include "UnitTest++/ReportAssertImpl.h"
#include "UnitTest++/AssertException.h"
#include "RecordingReporter.h"
#include <csetjmp>

View file

@ -1,5 +1,5 @@
#include "../../src/UnitTestPP.h"
#include "../CurrentTest.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/CurrentTest.h"
#include "RecordingReporter.h"
#include "ScopedCurrentTest.h"

View file

@ -1,4 +1,4 @@
#include "../../src/UnitTestPP.h"
#include "UnitTest++/UnitTestPP.h"
#include "RecordingReporter.h"
#include <cstring>

View file

@ -1,5 +1,5 @@
#include "../../src/UnitTestPP.h"
#include "../CompositeTestReporter.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/CompositeTestReporter.h"
using namespace UnitTest;

View file

@ -1,5 +1,5 @@
#include "../../src/UnitTestPP.h"
#include "../CurrentTest.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/CurrentTest.h"
#include "ScopedCurrentTest.h"
namespace

View file

@ -1,9 +1,9 @@
#include "../Config.h"
#include "UnitTest++/Config.h"
#ifndef UNITTEST_NO_DEFERRED_REPORTER
#include "../../src/UnitTestPP.h"
#include "../DeferredTestReporter.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/DeferredTestReporter.h"
#include <cstring>
namespace UnitTest

View file

@ -1,8 +1,8 @@
#include "../Config.h"
#include "UnitTest++/Config.h"
#ifndef UNITTEST_NO_EXCEPTIONS
#include "../../src/UnitTestPP.h"
#include "../CurrentTest.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/CurrentTest.h"
#include "RecordingReporter.h"
#include "ScopedCurrentTest.h"

View file

@ -1,6 +1,6 @@
#include "../../src/UnitTestPP.h"
#include "UnitTest++/UnitTestPP.h"
#include "../MemoryOutStream.h"
#include "UnitTest++/MemoryOutStream.h"
#include <cstring>
#include <cstdlib>
#include <climits>

View file

@ -1,6 +1,6 @@
#include "../../src/UnitTestPP.h"
#include "../TestReporter.h"
#include "../TimeHelpers.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/TestReporter.h"
#include "UnitTest++/TimeHelpers.h"
#include "ScopedCurrentTest.h"
using namespace UnitTest;

View file

@ -1,5 +1,5 @@
#include "../../src/UnitTestPP.h"
#include "../TestList.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/TestList.h"
using namespace UnitTest;

View file

@ -1,9 +1,9 @@
#include "../../src/UnitTestPP.h"
#include "../TestMacros.h"
#include "../TestList.h"
#include "../TestResults.h"
#include "../TestReporter.h"
#include "../ReportAssert.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/TestMacros.h"
#include "UnitTest++/TestList.h"
#include "UnitTest++/TestResults.h"
#include "UnitTest++/TestReporter.h"
#include "UnitTest++/ReportAssert.h"
#include "RecordingReporter.h"
#include "ScopedCurrentTest.h"

View file

@ -1,5 +1,5 @@
#include "../../src/UnitTestPP.h"
#include "../TestResults.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/TestResults.h"
#include "RecordingReporter.h"
using namespace UnitTest;

View file

@ -1,10 +1,10 @@
#include "../../src/UnitTestPP.h"
#include "UnitTest++/UnitTestPP.h"
#include "RecordingReporter.h"
#include "../ReportAssert.h"
#include "../TestList.h"
#include "../TimeHelpers.h"
#include "../TimeConstraint.h"
#include "../ReportAssertImpl.h"
#include "UnitTest++/ReportAssert.h"
#include "UnitTest++/TestList.h"
#include "UnitTest++/TimeHelpers.h"
#include "UnitTest++/TimeConstraint.h"
#include "UnitTest++/ReportAssertImpl.h"
using namespace UnitTest;

View file

@ -1,4 +1,4 @@
#include "../../src/UnitTestPP.h"
#include "UnitTest++/UnitTestPP.h"
// We're really testing if it's possible to use the same suite in two files
// to compile and link successfuly (TestTestSuite.cpp has suite with the same name)

View file

@ -1,6 +1,6 @@
#include "../../src/UnitTestPP.h"
#include "../TestResults.h"
#include "../TimeHelpers.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/TestResults.h"
#include "UnitTest++/TimeHelpers.h"
#include "RecordingReporter.h"
#include "ScopedCurrentTest.h"

View file

@ -1,5 +1,5 @@
#include "../../src/UnitTestPP.h"
#include "../TimeHelpers.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/TimeHelpers.h"
#include "RecordingReporter.h"
#include "ScopedCurrentTest.h"

View file

@ -1,4 +1,4 @@
#include "../../src/UnitTestPP.h"
#include "UnitTest++/UnitTestPP.h"
#include "ScopedCurrentTest.h"
// These are sample tests that show the different features of the framework

View file

@ -1,8 +1,8 @@
#include "../Config.h"
#include "UnitTest++/Config.h"
#ifndef UNITTEST_NO_DEFERRED_REPORTER
#include "../../src/UnitTestPP.h"
#include "../XmlTestReporter.h"
#include "UnitTest++/UnitTestPP.h"
#include "UnitTest++/XmlTestReporter.h"
#include <sstream>