diff --git a/CMakeLists.txt b/CMakeLists.txt index 9210fe6..ce5af75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,29 +1,42 @@ cmake_minimum_required(VERSION 2.8.1) 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 SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/*.cpp src/*.h) -source_group("" FILES ${SRCS}) +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 if (WIN32) - set(PLAT_DIR Win32) + set(platformDir_ Win32) else() - set(PLAT_DIR Posix) + set(platformDir_ Posix) endif(WIN32) -file(GLOB PLAT_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/${PLAT_DIR}/*.cpp src/${PLAT_DIR}/*.h) -source_group(${PLAT_DIR} FILES ${PLAT_SRCS}) + +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 -add_library(UnitTestPP STATIC ${SRCS} ${PLAT_SRCS}) -set_target_properties(UnitTestPP PROPERTIES OUTPUT_NAME UnitTest++) -include_directories(src) +add_library(UnitTestPP STATIC ${headers_} ${sources_} ${platformHeaders_} ${platformSources_}) + +if(${UTPP_USE_PLUS_SIGN}) + set_target_properties(UnitTestPP PROPERTIES OUTPUT_NAME UnitTest++) +endif() + # 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}) -set_target_properties(TestUnitTestPP PROPERTIES OUTPUT_NAME TestUnitTest++) +include_directories(.) + +if(${UTPP_USE_PLUS_SIGN}) + set_target_properties(TestUnitTestPP PROPERTIES OUTPUT_NAME TestUnitTest++) +endif() + target_link_libraries(TestUnitTestPP UnitTestPP) # turn on testing @@ -33,3 +46,17 @@ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -V) # add the test runner as a test add_test(NAME TestUnitTestPP COMMAND TestUnitTest++ ${CONFIG_PATH} ${CONFIG_TASKS_PATH} ${SOUND_LOG_PATH}) add_dependencies(check TestUnitTestPP) + + +# add install targets +# need a custom install path? +# define CMAKE_INSTALL_PREFIX to change root folder +if(${UTPP_USE_PLUS_SIGN}) + set (UTPP_INSTALL_DESTINATION "include/UnitTest++") +else() + set (UTPP_INSTALL_DESTINATION "include/UnitTestPP") +endif() + +install(TARGETS UnitTestPP DESTINATION lib) +install(FILES ${headers_} DESTINATION ${UTPP_INSTALL_DESTINATION}) +install(FILES ${platformHeaders_} DESTINATION ${UTPP_INSTALL_DESTINATION}/${platformDir_}) \ No newline at end of file diff --git a/src/AssertException.cpp b/UnitTest++/AssertException.cpp similarity index 100% rename from src/AssertException.cpp rename to UnitTest++/AssertException.cpp diff --git a/src/AssertException.h b/UnitTest++/AssertException.h similarity index 93% rename from src/AssertException.h rename to UnitTest++/AssertException.h index 620e397..e5d0705 100644 --- a/src/AssertException.h +++ b/UnitTest++/AssertException.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_ASSERTEXCEPTION_H #define UNITTEST_ASSERTEXCEPTION_H -#include "../config.h" +#include "Config.h" #ifndef UNITTEST_NO_EXCEPTIONS #include "HelperMacros.h" diff --git a/src/CheckMacros.h b/UnitTest++/CheckMacros.h similarity index 100% rename from src/CheckMacros.h rename to UnitTest++/CheckMacros.h diff --git a/src/Checks.cpp b/UnitTest++/Checks.cpp similarity index 100% rename from src/Checks.cpp rename to UnitTest++/Checks.cpp diff --git a/src/Checks.h b/UnitTest++/Checks.h similarity index 99% rename from src/Checks.h rename to UnitTest++/Checks.h index 4eb1842..b2cc4db 100644 --- a/src/Checks.h +++ b/UnitTest++/Checks.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_CHECKS_H #define UNITTEST_CHECKS_H -#include "../config.h" +#include "Config.h" #include "TestResults.h" #include "MemoryOutStream.h" diff --git a/src/CompositeTestReporter.cpp b/UnitTest++/CompositeTestReporter.cpp similarity index 100% rename from src/CompositeTestReporter.cpp rename to UnitTest++/CompositeTestReporter.cpp diff --git a/src/CompositeTestReporter.h b/UnitTest++/CompositeTestReporter.h similarity index 100% rename from src/CompositeTestReporter.h rename to UnitTest++/CompositeTestReporter.h diff --git a/config.h b/UnitTest++/Config.h similarity index 71% rename from config.h rename to UnitTest++/Config.h index 92706c7..5313b09 100644 --- a/config.h +++ b/UnitTest++/Config.h @@ -28,13 +28,22 @@ #endif -// MemoryOutStream is a custom reimplementation of parts of std::ostringstream. -// Uncomment this line to have MemoryOutStream implemented in terms of std::ostringstream. +// By default, MemoryOutStream is implemented in terms of std::ostringstream. // This is useful if you are using the CHECK macros on objects that have something like this defined: // std::ostringstream& operator<<(std::ostringstream& s, const YourObject& value) +// +// On the other hand, it can be more expensive. +// Un-comment this line to use the custom MemoryOutStream (no deps on std::ostringstream). -//#define UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM +// #define UNITTEST_USE_CUSTOM_STREAMS +// Developer note: This dual-macro setup is to preserve compatibility with UnitTest++ 1.4 users +// who may have used or defined UNITTEST_USE_CUSTOM_STREAMS outside of this configuration file, as +// well as Google Code HEAD users that may have used or defined +// UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM outside of this configuration file. +#ifndef UNITTEST_USE_CUSTOM_STREAMS + #define UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM +#endif // DeferredTestReporter uses the STL to collect test results for subsequent export by reporters like // XmlTestReporter. If you don't want to use this functionality, uncomment this line and no STL diff --git a/src/CurrentTest.cpp b/UnitTest++/CurrentTest.cpp similarity index 100% rename from src/CurrentTest.cpp rename to UnitTest++/CurrentTest.cpp diff --git a/src/CurrentTest.h b/UnitTest++/CurrentTest.h similarity index 100% rename from src/CurrentTest.h rename to UnitTest++/CurrentTest.h diff --git a/src/DeferredTestReporter.cpp b/UnitTest++/DeferredTestReporter.cpp similarity index 97% rename from src/DeferredTestReporter.cpp rename to UnitTest++/DeferredTestReporter.cpp index 4b731f4..60e0ded 100644 --- a/src/DeferredTestReporter.cpp +++ b/UnitTest++/DeferredTestReporter.cpp @@ -1,4 +1,4 @@ -#include "../config.h" +#include "Config.h" #ifndef UNITTEST_NO_DEFERRED_REPORTER #include "DeferredTestReporter.h" diff --git a/src/DeferredTestReporter.h b/UnitTest++/DeferredTestReporter.h similarity index 97% rename from src/DeferredTestReporter.h rename to UnitTest++/DeferredTestReporter.h index ad69b26..757e53f 100644 --- a/src/DeferredTestReporter.h +++ b/UnitTest++/DeferredTestReporter.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_DEFERREDTESTREPORTER_H #define UNITTEST_DEFERREDTESTREPORTER_H -#include "../config.h" +#include "Config.h" #ifndef UNITTEST_NO_DEFERRED_REPORTER diff --git a/src/DeferredTestResult.cpp b/UnitTest++/DeferredTestResult.cpp similarity index 96% rename from src/DeferredTestResult.cpp rename to UnitTest++/DeferredTestResult.cpp index ae54d38..5071f82 100644 --- a/src/DeferredTestResult.cpp +++ b/UnitTest++/DeferredTestResult.cpp @@ -1,4 +1,4 @@ -#include "../config.h" +#include "Config.h" #ifndef UNITTEST_NO_DEFERRED_REPORTER #include "DeferredTestResult.h" diff --git a/src/DeferredTestResult.h b/UnitTest++/DeferredTestResult.h similarity index 97% rename from src/DeferredTestResult.h rename to UnitTest++/DeferredTestResult.h index 6f56621..0929566 100644 --- a/src/DeferredTestResult.h +++ b/UnitTest++/DeferredTestResult.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_DEFERREDTESTRESULT_H #define UNITTEST_DEFERREDTESTRESULT_H -#include "../config.h" +#include "Config.h" #ifndef UNITTEST_NO_DEFERRED_REPORTER #include "HelperMacros.h" diff --git a/src/ExceptionMacros.h b/UnitTest++/ExceptionMacros.h similarity index 95% rename from src/ExceptionMacros.h rename to UnitTest++/ExceptionMacros.h index 508150f..e549c2c 100644 --- a/src/ExceptionMacros.h +++ b/UnitTest++/ExceptionMacros.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_EXCEPTIONMACROS_H #define UNITTEST_EXCEPTIONMACROS_H -#include "../config.h" +#include "Config.h" #ifndef UNITTEST_NO_EXCEPTIONS #define UT_TRY(x) try x diff --git a/src/ExecuteTest.h b/UnitTest++/ExecuteTest.h similarity index 98% rename from src/ExecuteTest.h rename to UnitTest++/ExecuteTest.h index d7abc90..d683dc0 100644 --- a/src/ExecuteTest.h +++ b/UnitTest++/ExecuteTest.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_EXECUTE_TEST_H #define UNITTEST_EXECUTE_TEST_H -#include "../config.h" +#include "Config.h" #include "ExceptionMacros.h" #include "TestDetails.h" #include "TestResults.h" diff --git a/src/HelperMacros.h b/UnitTest++/HelperMacros.h similarity index 98% rename from src/HelperMacros.h rename to UnitTest++/HelperMacros.h index 67e57ed..fb3181d 100644 --- a/src/HelperMacros.h +++ b/UnitTest++/HelperMacros.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_HELPERMACROS_H #define UNITTEST_HELPERMACROS_H -#include "../config.h" +#include "Config.h" #define UNITTEST_MULTILINE_MACRO_BEGIN do { diff --git a/src/Makefile.am b/UnitTest++/Makefile.am similarity index 100% rename from src/Makefile.am rename to UnitTest++/Makefile.am diff --git a/src/MemoryOutStream.cpp b/UnitTest++/MemoryOutStream.cpp similarity index 100% rename from src/MemoryOutStream.cpp rename to UnitTest++/MemoryOutStream.cpp diff --git a/src/MemoryOutStream.h b/UnitTest++/MemoryOutStream.h similarity index 98% rename from src/MemoryOutStream.h rename to UnitTest++/MemoryOutStream.h index ef2c86f..0c46f53 100644 --- a/src/MemoryOutStream.h +++ b/UnitTest++/MemoryOutStream.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_MEMORYOUTSTREAM_H #define UNITTEST_MEMORYOUTSTREAM_H -#include "../config.h" +#include "Config.h" #include "HelperMacros.h" #ifdef UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM diff --git a/src/Posix/SignalTranslator.cpp b/UnitTest++/Posix/SignalTranslator.cpp similarity index 100% rename from src/Posix/SignalTranslator.cpp rename to UnitTest++/Posix/SignalTranslator.cpp diff --git a/src/Posix/SignalTranslator.h b/UnitTest++/Posix/SignalTranslator.h similarity index 100% rename from src/Posix/SignalTranslator.h rename to UnitTest++/Posix/SignalTranslator.h diff --git a/src/Posix/TimeHelpers.cpp b/UnitTest++/Posix/TimeHelpers.cpp similarity index 100% rename from src/Posix/TimeHelpers.cpp rename to UnitTest++/Posix/TimeHelpers.cpp diff --git a/src/Posix/TimeHelpers.h b/UnitTest++/Posix/TimeHelpers.h similarity index 100% rename from src/Posix/TimeHelpers.h rename to UnitTest++/Posix/TimeHelpers.h diff --git a/src/ReportAssert.cpp b/UnitTest++/ReportAssert.cpp similarity index 100% rename from src/ReportAssert.cpp rename to UnitTest++/ReportAssert.cpp diff --git a/src/ReportAssert.h b/UnitTest++/ReportAssert.h similarity index 100% rename from src/ReportAssert.h rename to UnitTest++/ReportAssert.h diff --git a/src/ReportAssertImpl.h b/UnitTest++/ReportAssertImpl.h similarity index 97% rename from src/ReportAssertImpl.h rename to UnitTest++/ReportAssertImpl.h index 2f158c5..88efc03 100644 --- a/src/ReportAssertImpl.h +++ b/UnitTest++/ReportAssertImpl.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_REPORTASSERTIMPL_H #define UNITTEST_REPORTASSERTIMPL_H -#include "../config.h" +#include "Config.h" #include "HelperMacros.h" #ifdef UNITTEST_NO_EXCEPTIONS diff --git a/src/Test.cpp b/UnitTest++/Test.cpp similarity index 96% rename from src/Test.cpp rename to UnitTest++/Test.cpp index 6a270db..6941722 100644 --- a/src/Test.cpp +++ b/UnitTest++/Test.cpp @@ -1,4 +1,4 @@ -#include "../config.h" +#include "Config.h" #include "Test.h" #include "TestList.h" #include "TestResults.h" diff --git a/src/Test.h b/UnitTest++/Test.h similarity index 100% rename from src/Test.h rename to UnitTest++/Test.h diff --git a/src/TestDetails.cpp b/UnitTest++/TestDetails.cpp similarity index 100% rename from src/TestDetails.cpp rename to UnitTest++/TestDetails.cpp diff --git a/src/TestDetails.h b/UnitTest++/TestDetails.h similarity index 100% rename from src/TestDetails.h rename to UnitTest++/TestDetails.h diff --git a/src/TestList.cpp b/UnitTest++/TestList.cpp similarity index 100% rename from src/TestList.cpp rename to UnitTest++/TestList.cpp diff --git a/src/TestList.h b/UnitTest++/TestList.h similarity index 100% rename from src/TestList.h rename to UnitTest++/TestList.h diff --git a/src/TestMacros.h b/UnitTest++/TestMacros.h similarity index 99% rename from src/TestMacros.h rename to UnitTest++/TestMacros.h index 92b11a4..facc94e 100644 --- a/src/TestMacros.h +++ b/UnitTest++/TestMacros.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_TESTMACROS_H #define UNITTEST_TESTMACROS_H -#include "../config.h" +#include "Config.h" #include "TestSuite.h" #include "ExceptionMacros.h" #include "ExecuteTest.h" diff --git a/src/TestReporter.cpp b/UnitTest++/TestReporter.cpp similarity index 100% rename from src/TestReporter.cpp rename to UnitTest++/TestReporter.cpp diff --git a/src/TestReporter.h b/UnitTest++/TestReporter.h similarity index 100% rename from src/TestReporter.h rename to UnitTest++/TestReporter.h diff --git a/src/TestReporterStdout.cpp b/UnitTest++/TestReporterStdout.cpp similarity index 100% rename from src/TestReporterStdout.cpp rename to UnitTest++/TestReporterStdout.cpp diff --git a/src/TestReporterStdout.h b/UnitTest++/TestReporterStdout.h similarity index 100% rename from src/TestReporterStdout.h rename to UnitTest++/TestReporterStdout.h diff --git a/src/TestResults.cpp b/UnitTest++/TestResults.cpp similarity index 100% rename from src/TestResults.cpp rename to UnitTest++/TestResults.cpp diff --git a/src/TestResults.h b/UnitTest++/TestResults.h similarity index 100% rename from src/TestResults.h rename to UnitTest++/TestResults.h diff --git a/src/TestRunner.cpp b/UnitTest++/TestRunner.cpp similarity index 100% rename from src/TestRunner.cpp rename to UnitTest++/TestRunner.cpp diff --git a/src/TestRunner.h b/UnitTest++/TestRunner.h similarity index 100% rename from src/TestRunner.h rename to UnitTest++/TestRunner.h diff --git a/src/TestSuite.h b/UnitTest++/TestSuite.h similarity index 100% rename from src/TestSuite.h rename to UnitTest++/TestSuite.h diff --git a/src/TimeConstraint.cpp b/UnitTest++/TimeConstraint.cpp similarity index 100% rename from src/TimeConstraint.cpp rename to UnitTest++/TimeConstraint.cpp diff --git a/src/TimeConstraint.h b/UnitTest++/TimeConstraint.h similarity index 100% rename from src/TimeConstraint.h rename to UnitTest++/TimeConstraint.h diff --git a/src/TimeHelpers.h b/UnitTest++/TimeHelpers.h similarity index 82% rename from src/TimeHelpers.h rename to UnitTest++/TimeHelpers.h index bb5a31a..f34ed00 100644 --- a/src/TimeHelpers.h +++ b/UnitTest++/TimeHelpers.h @@ -1,4 +1,4 @@ -#include "../config.h" +#include "Config.h" #if defined UNITTEST_POSIX #include "Posix/TimeHelpers.h" diff --git a/UnitTest++/UnitTest++.h b/UnitTest++/UnitTest++.h new file mode 100644 index 0000000..1a9fe86 --- /dev/null +++ b/UnitTest++/UnitTest++.h @@ -0,0 +1 @@ +#include "UnitTestPP.h" \ No newline at end of file diff --git a/UnitTest++/UnitTestPP.h b/UnitTest++/UnitTestPP.h new file mode 100644 index 0000000..c9bbc0c --- /dev/null +++ b/UnitTest++/UnitTestPP.h @@ -0,0 +1,11 @@ +#ifndef UNITTESTPP_H +#define UNITTESTPP_H + +#include "Config.h" +#include "TestMacros.h" +#include "CheckMacros.h" +#include "TestRunner.h" +#include "TimeConstraint.h" +#include "ReportAssert.h" + +#endif diff --git a/src/Win32/TimeHelpers.cpp b/UnitTest++/Win32/TimeHelpers.cpp similarity index 100% rename from src/Win32/TimeHelpers.cpp rename to UnitTest++/Win32/TimeHelpers.cpp diff --git a/src/Win32/TimeHelpers.h b/UnitTest++/Win32/TimeHelpers.h similarity index 95% rename from src/Win32/TimeHelpers.h rename to UnitTest++/Win32/TimeHelpers.h index 4fb1b43..2bbe75f 100644 --- a/src/Win32/TimeHelpers.h +++ b/UnitTest++/Win32/TimeHelpers.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_TIMEHELPERS_H #define UNITTEST_TIMEHELPERS_H -#include "../../config.h" +#include "../Config.h" #include "../HelperMacros.h" #ifdef UNITTEST_MINGW diff --git a/src/XmlTestReporter.cpp b/UnitTest++/XmlTestReporter.cpp similarity index 99% rename from src/XmlTestReporter.cpp rename to UnitTest++/XmlTestReporter.cpp index c5e858b..c3312ea 100644 --- a/src/XmlTestReporter.cpp +++ b/UnitTest++/XmlTestReporter.cpp @@ -1,4 +1,4 @@ -#include "../config.h" +#include "Config.h" #ifndef UNITTEST_NO_DEFERRED_REPORTER #include "XmlTestReporter.h" diff --git a/src/XmlTestReporter.h b/UnitTest++/XmlTestReporter.h similarity index 97% rename from src/XmlTestReporter.h rename to UnitTest++/XmlTestReporter.h index 0c3441c..63d424e 100644 --- a/src/XmlTestReporter.h +++ b/UnitTest++/XmlTestReporter.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_XMLTESTREPORTER_H #define UNITTEST_XMLTESTREPORTER_H -#include "../config.h" +#include "Config.h" #ifndef UNITTEST_NO_DEFERRED_REPORTER #include "DeferredTestReporter.h" diff --git a/src/unittestpp_vs2005.vcproj b/UnitTest++/unittestpp_vs2005.vcproj similarity index 100% rename from src/unittestpp_vs2005.vcproj rename to UnitTest++/unittestpp_vs2005.vcproj diff --git a/src/unittestpp_vs2008.vcproj b/UnitTest++/unittestpp_vs2008.vcproj similarity index 100% rename from src/unittestpp_vs2008.vcproj rename to UnitTest++/unittestpp_vs2008.vcproj diff --git a/src/tests/Main.cpp b/tests/Main.cpp similarity index 66% rename from src/tests/Main.cpp rename to tests/Main.cpp index 47de7db..ae9cc54 100644 --- a/src/tests/Main.cpp +++ b/tests/Main.cpp @@ -1,4 +1,4 @@ -#include "../../unittestpp.h" +#include "UnitTest++/UnitTestPP.h" int main(int, char const *[]) { diff --git a/src/tests/RecordingReporter.h b/tests/RecordingReporter.h similarity index 97% rename from src/tests/RecordingReporter.h rename to tests/RecordingReporter.h index 982c294..ea899a2 100644 --- a/src/tests/RecordingReporter.h +++ b/tests/RecordingReporter.h @@ -1,10 +1,10 @@ #ifndef UNITTEST_RECORDINGREPORTER_H #define UNITTEST_RECORDINGREPORTER_H -#include "../TestReporter.h" +#include "UnitTest++/TestReporter.h" #include -#include "../TestDetails.h" +#include "UnitTest++/TestDetails.h" struct RecordingReporter : public UnitTest::TestReporter { diff --git a/src/tests/ScopedCurrentTest.h b/tests/ScopedCurrentTest.h similarity index 96% rename from src/tests/ScopedCurrentTest.h rename to tests/ScopedCurrentTest.h index e03ae0a..60b1a8e 100644 --- a/src/tests/ScopedCurrentTest.h +++ b/tests/ScopedCurrentTest.h @@ -1,7 +1,7 @@ #ifndef UNITTEST_SCOPEDCURRENTTEST_H #define UNITTEST_SCOPEDCURRENTTEST_H -#include "../CurrentTest.h" +#include "UnitTest++/CurrentTest.h" #include class ScopedCurrentTest diff --git a/src/tests/TestAssertHandler.cpp b/tests/TestAssertHandler.cpp similarity index 93% rename from src/tests/TestAssertHandler.cpp rename to tests/TestAssertHandler.cpp index 6caba43..c9286f3 100644 --- a/src/tests/TestAssertHandler.cpp +++ b/tests/TestAssertHandler.cpp @@ -1,9 +1,9 @@ -#include "../../config.h" -#include "../../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 diff --git a/src/tests/TestCheckMacros.cpp b/tests/TestCheckMacros.cpp similarity index 99% rename from src/tests/TestCheckMacros.cpp rename to tests/TestCheckMacros.cpp index c6c727b..45ea0e9 100644 --- a/src/tests/TestCheckMacros.cpp +++ b/tests/TestCheckMacros.cpp @@ -1,5 +1,5 @@ -#include "../../unittestpp.h" -#include "../CurrentTest.h" +#include "UnitTest++/UnitTestPP.h" +#include "UnitTest++/CurrentTest.h" #include "RecordingReporter.h" #include "ScopedCurrentTest.h" diff --git a/src/tests/TestChecks.cpp b/tests/TestChecks.cpp similarity index 99% rename from src/tests/TestChecks.cpp rename to tests/TestChecks.cpp index 3d73b99..758ca31 100644 --- a/src/tests/TestChecks.cpp +++ b/tests/TestChecks.cpp @@ -1,4 +1,4 @@ -#include "../../unittestpp.h" +#include "UnitTest++/UnitTestPP.h" #include "RecordingReporter.h" #include diff --git a/src/tests/TestCompositeTestReporter.cpp b/tests/TestCompositeTestReporter.cpp similarity index 98% rename from src/tests/TestCompositeTestReporter.cpp rename to tests/TestCompositeTestReporter.cpp index c3d6a24..9440a9e 100644 --- a/src/tests/TestCompositeTestReporter.cpp +++ b/tests/TestCompositeTestReporter.cpp @@ -1,5 +1,5 @@ -#include "../../unittestpp.h" -#include "../CompositeTestReporter.h" +#include "UnitTest++/UnitTestPP.h" +#include "UnitTest++/CompositeTestReporter.h" using namespace UnitTest; diff --git a/src/tests/TestCurrentTest.cpp b/tests/TestCurrentTest.cpp similarity index 89% rename from src/tests/TestCurrentTest.cpp rename to tests/TestCurrentTest.cpp index 35f9c5a..7de1a72 100644 --- a/src/tests/TestCurrentTest.cpp +++ b/tests/TestCurrentTest.cpp @@ -1,5 +1,5 @@ -#include "../../unittestpp.h" -#include "../CurrentTest.h" +#include "UnitTest++/UnitTestPP.h" +#include "UnitTest++/CurrentTest.h" #include "ScopedCurrentTest.h" namespace diff --git a/src/tests/TestDeferredTestReporter.cpp b/tests/TestDeferredTestReporter.cpp similarity index 96% rename from src/tests/TestDeferredTestReporter.cpp rename to tests/TestDeferredTestReporter.cpp index a45eb05..60c347c 100644 --- a/src/tests/TestDeferredTestReporter.cpp +++ b/tests/TestDeferredTestReporter.cpp @@ -1,9 +1,9 @@ -#include "../../config.h" +#include "UnitTest++/Config.h" #ifndef UNITTEST_NO_DEFERRED_REPORTER -#include "../../unittestpp.h" -#include "../DeferredTestReporter.h" +#include "UnitTest++/UnitTestPP.h" +#include "UnitTest++/DeferredTestReporter.h" #include namespace UnitTest diff --git a/src/tests/TestExceptions.cpp b/tests/TestExceptions.cpp similarity index 99% rename from src/tests/TestExceptions.cpp rename to tests/TestExceptions.cpp index fa8b917..1a0ab04 100644 --- a/src/tests/TestExceptions.cpp +++ b/tests/TestExceptions.cpp @@ -1,8 +1,8 @@ -#include "../../config.h" +#include "UnitTest++/Config.h" #ifndef UNITTEST_NO_EXCEPTIONS -#include "../../unittestpp.h" -#include "../CurrentTest.h" +#include "UnitTest++/UnitTestPP.h" +#include "UnitTest++/CurrentTest.h" #include "RecordingReporter.h" #include "ScopedCurrentTest.h" diff --git a/src/tests/TestMemoryOutStream.cpp b/tests/TestMemoryOutStream.cpp similarity index 99% rename from src/tests/TestMemoryOutStream.cpp rename to tests/TestMemoryOutStream.cpp index 8ab0d03..74a9a56 100644 --- a/src/tests/TestMemoryOutStream.cpp +++ b/tests/TestMemoryOutStream.cpp @@ -1,6 +1,6 @@ -#include "../../unittestpp.h" +#include "UnitTest++/UnitTestPP.h" -#include "../MemoryOutStream.h" +#include "UnitTest++/MemoryOutStream.h" #include #include #include diff --git a/src/tests/TestTest.cpp b/tests/TestTest.cpp similarity index 95% rename from src/tests/TestTest.cpp rename to tests/TestTest.cpp index efa31b8..2aeab6d 100644 --- a/src/tests/TestTest.cpp +++ b/tests/TestTest.cpp @@ -1,6 +1,6 @@ -#include "../../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; diff --git a/src/tests/TestTestList.cpp b/tests/TestTestList.cpp similarity index 91% rename from src/tests/TestTestList.cpp rename to tests/TestTestList.cpp index 59517e7..73732c5 100644 --- a/src/tests/TestTestList.cpp +++ b/tests/TestTestList.cpp @@ -1,5 +1,5 @@ -#include "../../unittestpp.h" -#include "../TestList.h" +#include "UnitTest++/UnitTestPP.h" +#include "UnitTest++/TestList.h" using namespace UnitTest; diff --git a/src/tests/TestTestMacros.cpp b/tests/TestTestMacros.cpp similarity index 95% rename from src/tests/TestTestMacros.cpp rename to tests/TestTestMacros.cpp index 8ab11d6..4f0cfed 100644 --- a/src/tests/TestTestMacros.cpp +++ b/tests/TestTestMacros.cpp @@ -1,9 +1,9 @@ -#include "../../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" diff --git a/src/tests/TestTestResults.cpp b/tests/TestTestResults.cpp similarity index 97% rename from src/tests/TestTestResults.cpp rename to tests/TestTestResults.cpp index 38414e5..a115687 100644 --- a/src/tests/TestTestResults.cpp +++ b/tests/TestTestResults.cpp @@ -1,5 +1,5 @@ -#include "../../unittestpp.h" -#include "../TestResults.h" +#include "UnitTest++/UnitTestPP.h" +#include "UnitTest++/TestResults.h" #include "RecordingReporter.h" using namespace UnitTest; diff --git a/src/tests/TestTestRunner.cpp b/tests/TestTestRunner.cpp similarity index 97% rename from src/tests/TestTestRunner.cpp rename to tests/TestTestRunner.cpp index 5b2d65a..fa05356 100644 --- a/src/tests/TestTestRunner.cpp +++ b/tests/TestTestRunner.cpp @@ -1,10 +1,10 @@ -#include "../../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; diff --git a/src/tests/TestTestSuite.cpp b/tests/TestTestSuite.cpp similarity index 88% rename from src/tests/TestTestSuite.cpp rename to tests/TestTestSuite.cpp index ad7725f..ff56089 100644 --- a/src/tests/TestTestSuite.cpp +++ b/tests/TestTestSuite.cpp @@ -1,4 +1,4 @@ -#include "../../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) diff --git a/src/tests/TestTimeConstraint.cpp b/tests/TestTimeConstraint.cpp similarity index 93% rename from src/tests/TestTimeConstraint.cpp rename to tests/TestTimeConstraint.cpp index eec7e43..5cb6c16 100644 --- a/src/tests/TestTimeConstraint.cpp +++ b/tests/TestTimeConstraint.cpp @@ -1,6 +1,6 @@ -#include "../../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" diff --git a/src/tests/TestTimeConstraintMacro.cpp b/tests/TestTimeConstraintMacro.cpp similarity index 97% rename from src/tests/TestTimeConstraintMacro.cpp rename to tests/TestTimeConstraintMacro.cpp index ebb5388..3caf15d 100644 --- a/src/tests/TestTimeConstraintMacro.cpp +++ b/tests/TestTimeConstraintMacro.cpp @@ -1,5 +1,5 @@ -#include "../../unittestpp.h" -#include "../TimeHelpers.h" +#include "UnitTest++/UnitTestPP.h" +#include "UnitTest++/TimeHelpers.h" #include "RecordingReporter.h" #include "ScopedCurrentTest.h" diff --git a/src/tests/TestUnitTestPP.cpp b/tests/TestUnitTestPP.cpp similarity index 98% rename from src/tests/TestUnitTestPP.cpp rename to tests/TestUnitTestPP.cpp index f38ca93..3bd6ab7 100644 --- a/src/tests/TestUnitTestPP.cpp +++ b/tests/TestUnitTestPP.cpp @@ -1,4 +1,4 @@ -#include "../../unittestpp.h" +#include "UnitTest++/UnitTestPP.h" #include "ScopedCurrentTest.h" // These are sample tests that show the different features of the framework diff --git a/src/tests/TestXmlTestReporter.cpp b/tests/TestXmlTestReporter.cpp similarity index 98% rename from src/tests/TestXmlTestReporter.cpp rename to tests/TestXmlTestReporter.cpp index ec9cb7a..154ada8 100644 --- a/src/tests/TestXmlTestReporter.cpp +++ b/tests/TestXmlTestReporter.cpp @@ -1,8 +1,8 @@ -#include "../../config.h" +#include "UnitTest++/Config.h" #ifndef UNITTEST_NO_DEFERRED_REPORTER -#include "../../unittestpp.h" -#include "../XmlTestReporter.h" +#include "UnitTest++/UnitTestPP.h" +#include "UnitTest++/XmlTestReporter.h" #include diff --git a/src/tests/test-unittestpp_vs2005.vcproj b/tests/test-unittestpp_vs2005.vcproj similarity index 100% rename from src/tests/test-unittestpp_vs2005.vcproj rename to tests/test-unittestpp_vs2005.vcproj diff --git a/src/tests/test-unittestpp_vs2008.vcproj b/tests/test-unittestpp_vs2008.vcproj similarity index 100% rename from src/tests/test-unittestpp_vs2008.vcproj rename to tests/test-unittestpp_vs2008.vcproj diff --git a/unittestpp.h b/unittestpp.h deleted file mode 100644 index dd3a5de..0000000 --- a/unittestpp.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef UNITTESTPP_H -#define UNITTESTPP_H - -#include "config.h" -#include "src/TestMacros.h" -#include "src/CheckMacros.h" -#include "src/TestRunner.h" -#include "src/TimeConstraint.h" -#include "src/ReportAssert.h" - -#endif