Mercurial > hg > orthanc
changeset 265:9cd240cfd3a6 Orthanc-0.3.1
fixes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 10 Dec 2012 11:00:50 +0100 |
parents | 3b3525dee661 |
children | 2ccf556dc1ce ffd98d2f0b91 |
files | CMakeLists.txt Core/Compression/HierarchicalZipWriter.h Core/Compression/ZipWriter.h Core/SQLite/Statement.h |
diffstat | 4 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Sun Dec 09 15:01:00 2012 +0100 +++ b/CMakeLists.txt Mon Dec 10 11:00:50 2012 +0100 @@ -178,6 +178,7 @@ # Build the unit tests if required if (BUILD_UNIT_TESTS) + add_definitions(-DORTHANC_BUILD_UNIT_TESTS=1) include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) add_executable(UnitTests ${GTEST_SOURCES}
--- a/Core/Compression/HierarchicalZipWriter.h Sun Dec 09 15:01:00 2012 +0100 +++ b/Core/Compression/HierarchicalZipWriter.h Mon Dec 10 11:00:50 2012 +0100 @@ -42,8 +42,10 @@ { class HierarchicalZipWriter { +#if ORTHANC_BUILD_UNIT_TESTS == 1 FRIEND_TEST(HierarchicalZipWriter, Index); FRIEND_TEST(HierarchicalZipWriter, Filenames); +#endif private: class Index
--- a/Core/Compression/ZipWriter.h Sun Dec 09 15:01:00 2012 +0100 +++ b/Core/Compression/ZipWriter.h Mon Dec 10 11:00:50 2012 +0100 @@ -35,7 +35,10 @@ #include <stdint.h> #include <string> #include <boost/shared_ptr.hpp> + +#if ORTHANC_BUILD_UNIT_TESTS == 1 #include <gtest/gtest_prod.h> +#endif namespace Orthanc {
--- a/Core/SQLite/Statement.h Sun Dec 09 15:01:00 2012 +0100 +++ b/Core/SQLite/Statement.h Mon Dec 10 11:00:50 2012 +0100 @@ -43,7 +43,10 @@ #include <vector> #include <stdint.h> #include <boost/noncopyable.hpp> + +#if ORTHANC_BUILD_UNIT_TESTS == 1 #include <gtest/gtest_prod.h> +#endif struct sqlite3_stmt; @@ -68,8 +71,11 @@ class Statement : public boost::noncopyable { friend class Connection; + +#if ORTHANC_BUILD_UNIT_TESTS == 1 FRIEND_TEST(SQLStatementTest, Run); FRIEND_TEST(SQLStatementTest, Reset); +#endif private: StatementReference reference_;