From 693063a7cec76b8f60c9059a878c21aad680ecf1 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sat, 23 Feb 2008 03:05:32 +0000 Subject: [PATCH] Let's make the tests also compile with boost 1.33 (auto_unit_test.hpp is a compat header in 1.34, so we can use it, and the BOOST_AUTO_TEST_MAIN define is a no-op in 1.34 boost, so we also can use it unconditionally). --- CMakeLists.txt | 2 +- tests/parser/inifile/inidict_test.cc | 2 +- tests/parser/inifile/iniparser_test.cc | 2 +- tests/parser/yum/PatchFileReader_test.cc | 2 +- tests/parser/yum/PatchesFileReader_test.cc | 2 +- tests/parser/yum/RepomdFileReader_test.cc | 2 +- tests/repo/RepoVariables_test.cc | 2 +- tests/repo/susetags/Downloader_test.cc | 2 +- tests/repo/yum/YUMDownloader_test.cc | 2 +- tests/zypp/Arch_test.cc | 2 +- tests/zypp/Capabilities_test.cc | 2 +- tests/zypp/CheckSum_test.cc | 2 +- tests/zypp/Digest_test.cc | 2 +- tests/zypp/Edition_test.cc | 2 +- tests/zypp/Fetcher_test.cc | 2 +- tests/zypp/FileChecker_test.cc | 2 +- tests/zypp/KeyRing_test.cc | 3 +-- tests/zypp/MediaSetAccess_test.cc | 5 ++++- tests/zypp/PathInfo_test.cc | 2 +- tests/zypp/PoolQuery_test.cc | 2 +- tests/zypp/ProgressData_test.cc | 2 +- tests/zypp/PtrTypes_test.cc | 2 +- tests/zypp/PublicKey_test.cc | 2 +- tests/zypp/RWPtr_test.cc | 2 +- tests/zypp/RepoInfo_test.cc | 2 +- tests/zypp/RepoManager_test.cc | 2 +- tests/zypp/RepoStatus_test.cc | 2 +- tests/zypp/ResKind_test.cc | 2 +- tests/zypp/Signature_test.cc | 2 +- tests/zypp/TranslatedText_test.cc | 2 +- tests/zypp/Url_test.cc | 2 +- tests/zypp/Vendor_test.cc | 2 +- tests/zypp/base/Sysconfig_test.cc | 3 +-- 33 files changed, 36 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f446485..7136b54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ INCLUDE(CPack) MACRO(ADD_TESTS) FOREACH( loop_var ${ARGV} ) - SET_SOURCE_FILES_PROPERTIES( ${loop_var}_test.cc COMPILE_FLAGS "-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN" ) + SET_SOURCE_FILES_PROPERTIES( ${loop_var}_test.cc COMPILE_FLAGS "-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN -DBOOST_AUTO_TEST_MAIN=\"\" " ) ADD_EXECUTABLE( ${loop_var}_test ${loop_var}_test.cc ) TARGET_LINK_LIBRARIES( ${loop_var}_test zypp boost_unit_test_framework) ADD_TEST( ${loop_var}_test ${CMAKE_CURRENT_BINARY_DIR}/${loop_var}_test) diff --git a/tests/parser/inifile/inidict_test.cc b/tests/parser/inifile/inidict_test.cc index f5b6370..8a180f5 100644 --- a/tests/parser/inifile/inidict_test.cc +++ b/tests/parser/inifile/inidict_test.cc @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "zypp/base/Logger.h" #include "zypp/base/InputStream.h" diff --git a/tests/parser/inifile/iniparser_test.cc b/tests/parser/inifile/iniparser_test.cc index bb647fc..8857bd3 100644 --- a/tests/parser/inifile/iniparser_test.cc +++ b/tests/parser/inifile/iniparser_test.cc @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "zypp/base/Logger.h" #include "zypp/base/InputStream.h" diff --git a/tests/parser/yum/PatchFileReader_test.cc b/tests/parser/yum/PatchFileReader_test.cc index 272c07b..1d8e4bc 100644 --- a/tests/parser/yum/PatchFileReader_test.cc +++ b/tests/parser/yum/PatchFileReader_test.cc @@ -1,4 +1,4 @@ -#include +#include #include "zypp/base/Easy.h" #include "zypp/Url.h" diff --git a/tests/parser/yum/PatchesFileReader_test.cc b/tests/parser/yum/PatchesFileReader_test.cc index 71b7d01..7c57a2e 100644 --- a/tests/parser/yum/PatchesFileReader_test.cc +++ b/tests/parser/yum/PatchesFileReader_test.cc @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "zypp/OnMediaLocation.h" #include "zypp/parser/yum/PatchesFileReader.h" diff --git a/tests/parser/yum/RepomdFileReader_test.cc b/tests/parser/yum/RepomdFileReader_test.cc index b6aa3c5..b5554c4 100644 --- a/tests/parser/yum/RepomdFileReader_test.cc +++ b/tests/parser/yum/RepomdFileReader_test.cc @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "zypp/parser/yum/RepomdFileReader.h" #include "zypp/Url.h" diff --git a/tests/repo/RepoVariables_test.cc b/tests/repo/RepoVariables_test.cc index 69ee58b..31f92b2 100644 --- a/tests/repo/RepoVariables_test.cc +++ b/tests/repo/RepoVariables_test.cc @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "zypp/ZYppFactory.h" #include "zypp/Url.h" diff --git a/tests/repo/susetags/Downloader_test.cc b/tests/repo/susetags/Downloader_test.cc index a474651..e6a84dd 100644 --- a/tests/repo/susetags/Downloader_test.cc +++ b/tests/repo/susetags/Downloader_test.cc @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "zypp/base/Logger.h" #include "zypp/Url.h" diff --git a/tests/repo/yum/YUMDownloader_test.cc b/tests/repo/yum/YUMDownloader_test.cc index 993d230..943a02f 100644 --- a/tests/repo/yum/YUMDownloader_test.cc +++ b/tests/repo/yum/YUMDownloader_test.cc @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "zypp/base/Logger.h" #include "zypp/Url.h" diff --git a/tests/zypp/Arch_test.cc b/tests/zypp/Arch_test.cc index 7a46dd2..de0beb6 100644 --- a/tests/zypp/Arch_test.cc +++ b/tests/zypp/Arch_test.cc @@ -12,7 +12,7 @@ // Boost.Test #include -#include +#include using boost::unit_test::test_suite; using boost::unit_test::test_case; diff --git a/tests/zypp/Capabilities_test.cc b/tests/zypp/Capabilities_test.cc index 2dc570b..d2b90c0 100644 --- a/tests/zypp/Capabilities_test.cc +++ b/tests/zypp/Capabilities_test.cc @@ -6,7 +6,7 @@ // Boost.Test #include -#include +#include #include "zypp/Capability.h" diff --git a/tests/zypp/CheckSum_test.cc b/tests/zypp/CheckSum_test.cc index 0de9221..fd1385d 100644 --- a/tests/zypp/CheckSum_test.cc +++ b/tests/zypp/CheckSum_test.cc @@ -4,7 +4,7 @@ #include // Boost.Test -#include +#include #include "zypp/base/Logger.h" #include "zypp/base/Exception.h" diff --git a/tests/zypp/Digest_test.cc b/tests/zypp/Digest_test.cc index b385c7f..19e83c0 100644 --- a/tests/zypp/Digest_test.cc +++ b/tests/zypp/Digest_test.cc @@ -5,7 +5,7 @@ #include #include -#include +#include #include "zypp/base/Logger.h" #include "zypp/base/Exception.h" diff --git a/tests/zypp/Edition_test.cc b/tests/zypp/Edition_test.cc index 72e1bd7..bd2f74b 100644 --- a/tests/zypp/Edition_test.cc +++ b/tests/zypp/Edition_test.cc @@ -6,7 +6,7 @@ #include "zypp/base/Logger.h" #include "zypp/Edition.h" -#include +#include using boost::unit_test::test_case; diff --git a/tests/zypp/Fetcher_test.cc b/tests/zypp/Fetcher_test.cc index c016eae..1b22257 100644 --- a/tests/zypp/Fetcher_test.cc +++ b/tests/zypp/Fetcher_test.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include diff --git a/tests/zypp/FileChecker_test.cc b/tests/zypp/FileChecker_test.cc index b56fc0f..59b47de 100644 --- a/tests/zypp/FileChecker_test.cc +++ b/tests/zypp/FileChecker_test.cc @@ -12,7 +12,7 @@ #include "zypp/FileChecker.h" -#include +#include #include "KeyRingTestReceiver.h" diff --git a/tests/zypp/KeyRing_test.cc b/tests/zypp/KeyRing_test.cc index 9500def..e5d3f21 100644 --- a/tests/zypp/KeyRing_test.cc +++ b/tests/zypp/KeyRing_test.cc @@ -10,13 +10,12 @@ #include "zypp/PublicKey.h" #include "zypp/TmpPath.h" -#include +#include #include "KeyRingTestReceiver.h" using boost::unit_test::test_suite; using boost::unit_test::test_case; -using namespace boost::unit_test::log; using namespace std; using namespace zypp; diff --git a/tests/zypp/MediaSetAccess_test.cc b/tests/zypp/MediaSetAccess_test.cc index 151c0e0..921fbaa 100644 --- a/tests/zypp/MediaSetAccess_test.cc +++ b/tests/zypp/MediaSetAccess_test.cc @@ -1,6 +1,9 @@ #include #include -#include +#ifdef BOOST_AUTO_TEST_MAIN +#undef BOOST_AUTO_TEST_MAIN +#endif +#include #include #include diff --git a/tests/zypp/PathInfo_test.cc b/tests/zypp/PathInfo_test.cc index 79eaa0d..8af9492 100644 --- a/tests/zypp/PathInfo_test.cc +++ b/tests/zypp/PathInfo_test.cc @@ -4,7 +4,7 @@ #include #include -#include +#include #include "zypp/base/Logger.h" #include "zypp/base/Exception.h" diff --git a/tests/zypp/PoolQuery_test.cc b/tests/zypp/PoolQuery_test.cc index a999d25..bf95738 100644 --- a/tests/zypp/PoolQuery_test.cc +++ b/tests/zypp/PoolQuery_test.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "zypp/ZYppFactory.h" #include "zypp/PoolQuery.h" diff --git a/tests/zypp/ProgressData_test.cc b/tests/zypp/ProgressData_test.cc index 2d3900f..02b06fd 100644 --- a/tests/zypp/ProgressData_test.cc +++ b/tests/zypp/ProgressData_test.cc @@ -7,7 +7,7 @@ #include "zypp/base/Logger.h" #include "zypp/base/Exception.h" -#include +#include #include "zypp/ProgressData.h" diff --git a/tests/zypp/PtrTypes_test.cc b/tests/zypp/PtrTypes_test.cc index 556ad58..a2d9427 100644 --- a/tests/zypp/PtrTypes_test.cc +++ b/tests/zypp/PtrTypes_test.cc @@ -1,6 +1,6 @@ #include -#include +#include #include "zypp/base/Logger.h" #include diff --git a/tests/zypp/PublicKey_test.cc b/tests/zypp/PublicKey_test.cc index 181b382..e08c313 100644 --- a/tests/zypp/PublicKey_test.cc +++ b/tests/zypp/PublicKey_test.cc @@ -9,7 +9,7 @@ #include "zypp/PublicKey.h" #include "zypp/TmpPath.h" -#include +#include using boost::unit_test::test_suite; using boost::unit_test::test_case; diff --git a/tests/zypp/RWPtr_test.cc b/tests/zypp/RWPtr_test.cc index ec11010..5953328 100644 --- a/tests/zypp/RWPtr_test.cc +++ b/tests/zypp/RWPtr_test.cc @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/zypp/RepoInfo_test.cc b/tests/zypp/RepoInfo_test.cc index 97ee150..c1bad6b 100644 --- a/tests/zypp/RepoInfo_test.cc +++ b/tests/zypp/RepoInfo_test.cc @@ -9,7 +9,7 @@ #include "zypp/RepoInfo.h" -#include +#include #include #include diff --git a/tests/zypp/RepoManager_test.cc b/tests/zypp/RepoManager_test.cc index 50e96a8..b16b6da 100644 --- a/tests/zypp/RepoManager_test.cc +++ b/tests/zypp/RepoManager_test.cc @@ -13,7 +13,7 @@ #include "zypp/RepoManager.h" -#include +#include #include "KeyRingTestReceiver.h" diff --git a/tests/zypp/RepoStatus_test.cc b/tests/zypp/RepoStatus_test.cc index 62302f6..965d90c 100644 --- a/tests/zypp/RepoStatus_test.cc +++ b/tests/zypp/RepoStatus_test.cc @@ -5,7 +5,7 @@ #include "zypp/RepoStatus.h" #include "zypp/PathInfo.h" -#include +#include using boost::unit_test::test_suite; using boost::unit_test::test_case; diff --git a/tests/zypp/ResKind_test.cc b/tests/zypp/ResKind_test.cc index 9e8cbbf..e90e506 100644 --- a/tests/zypp/ResKind_test.cc +++ b/tests/zypp/ResKind_test.cc @@ -1,4 +1,4 @@ -#include +#include #include "zypp/base/Logger.h" #include "zypp/ResKind.h" diff --git a/tests/zypp/Signature_test.cc b/tests/zypp/Signature_test.cc index 8bc7518..1fe0fc7 100644 --- a/tests/zypp/Signature_test.cc +++ b/tests/zypp/Signature_test.cc @@ -7,7 +7,7 @@ #include "zypp/base/Exception.h" #include "zypp/Signature.h" -#include +#include using boost::unit_test::test_suite; using boost::unit_test::test_case; diff --git a/tests/zypp/TranslatedText_test.cc b/tests/zypp/TranslatedText_test.cc index 981983b..e371fdc 100644 --- a/tests/zypp/TranslatedText_test.cc +++ b/tests/zypp/TranslatedText_test.cc @@ -7,7 +7,7 @@ #include "zypp/ZYppFactory.h" #include "zypp/ZYpp.h" -#include +#include using boost::unit_test::test_suite; using boost::unit_test::test_case; diff --git a/tests/zypp/Url_test.cc b/tests/zypp/Url_test.cc index d0f0e24..c4c25b6 100644 --- a/tests/zypp/Url_test.cc +++ b/tests/zypp/Url_test.cc @@ -12,7 +12,7 @@ #include // Boost.Test -#include +#include using boost::unit_test::test_case; using namespace zypp; diff --git a/tests/zypp/Vendor_test.cc b/tests/zypp/Vendor_test.cc index 0d64fd3..264f024 100644 --- a/tests/zypp/Vendor_test.cc +++ b/tests/zypp/Vendor_test.cc @@ -4,7 +4,7 @@ #include // Boost.Test -#include +#include #include "zypp/base/LogControl.h" #include "zypp/base/Logger.h" diff --git a/tests/zypp/base/Sysconfig_test.cc b/tests/zypp/base/Sysconfig_test.cc index 9468523..610555a 100644 --- a/tests/zypp/base/Sysconfig_test.cc +++ b/tests/zypp/base/Sysconfig_test.cc @@ -4,7 +4,7 @@ #include #include -#include +#include #include "zypp/base/Logger.h" #include "zypp/base/Exception.h" @@ -16,7 +16,6 @@ using boost::unit_test::test_suite; using boost::unit_test::test_case; using namespace boost::unit_test; -using namespace boost::unit_test::log; using namespace std; using namespace zypp; -- 2.7.4