From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- indexlib/GPL_V2 | 4 +- indexlib/bitio.h | 6 +- indexlib/bitstream.cpp | 6 +- indexlib/bitstream.h | 6 +- indexlib/boost-compat/config/auto_link.hpp | 2 +- indexlib/boost-compat/config/platform/macos.hpp | 2 +- indexlib/boost-compat/config/requires_threads.hpp | 6 +- .../boost-compat/config/select_stdlib_config.hpp | 2 +- indexlib/boost-compat/config/suffix.hpp | 2 +- indexlib/boost-compat/config/user.hpp | 8 +- indexlib/boost-compat/shared_ptr.hpp | 2 +- indexlib/compat.h | 8 +- indexlib/compressed.cpp | 6 +- indexlib/compressed.h | 6 +- indexlib/create.cpp | 6 +- indexlib/create.h | 6 +- indexlib/exception.cpp | 6 +- indexlib/exception.h | 6 +- indexlib/ifile.cpp | 6 +- indexlib/ifile.h | 6 +- indexlib/index.h | 6 +- indexlib/index_slow.h | 6 +- indexlib/leafdata.cpp | 6 +- indexlib/leafdata.h | 6 +- indexlib/leafdatavector.cpp | 6 +- indexlib/leafdatavector.h | 6 +- indexlib/lockfile.cpp | 6 +- indexlib/lockfile.h | 6 +- indexlib/logfile.cpp | 6 +- indexlib/logfile.h | 6 +- indexlib/main.cpp | 6 +- indexlib/manager.h | 12 +-- indexlib/match.cpp | 6 +- indexlib/match.h | 6 +- indexlib/mempool.h | 16 +-- indexlib/mempool.tcc | 2 +- indexlib/memreference.h | 6 +- indexlib/memvector.h | 6 +- indexlib/mmap_manager.cpp | 6 +- indexlib/mmap_manager.h | 6 +- indexlib/path.h | 6 +- indexlib/pointer.h | 6 +- indexlib/quotes.cpp | 6 +- indexlib/quotes.h | 12 +-- indexlib/result.h | 6 +- indexlib/slow.cpp | 6 +- indexlib/slow.h | 6 +- indexlib/stringarray.cpp | 6 +- indexlib/stringarray.h | 6 +- indexlib/stringset.cpp | 6 +- indexlib/stringset.h | 8 +- indexlib/tests/ifile-test.cpp | 72 +++++++------- indexlib/tests/leafdatavector-test.cpp | 38 ++++---- indexlib/tests/match-test.cpp | 50 +++++----- indexlib/tests/mempool-test.cpp | 2 +- indexlib/tests/memvector-test.cpp | 108 ++++++++++----------- indexlib/tests/stringarray-test.cpp | 42 ++++---- indexlib/tests/stringset-test.cpp | 62 ++++++------ indexlib/tests/testdriver.cpp | 6 +- indexlib/tests/tokenizer-test.cpp | 12 +-- indexlib/thing.h | 6 +- 61 files changed, 353 insertions(+), 353 deletions(-) (limited to 'indexlib') diff --git a/indexlib/GPL_V2 b/indexlib/GPL_V2 index cfa6e1a8..07dec1a9 100644 --- a/indexlib/GPL_V2 +++ b/indexlib/GPL_V2 @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains + 0. This License applies to any program or other work which tqcontains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any +code means all the source code for all modules it tqcontains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/indexlib/bitio.h b/indexlib/bitio.h index 8072d74b..40f4ef7d 100644 --- a/indexlib/bitio.h +++ b/indexlib/bitio.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/bitstream.cpp b/indexlib/bitstream.cpp index 62e8803c..abb77bc2 100644 --- a/indexlib/bitstream.cpp +++ b/indexlib/bitstream.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/bitstream.h b/indexlib/bitstream.h index 7cc491a0..5533d262 100644 --- a/indexlib/bitstream.h +++ b/indexlib/bitstream.h @@ -20,11 +20,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/boost-compat/config/auto_link.hpp b/indexlib/boost-compat/config/auto_link.hpp index 9723a18f..b4e580ff 100644 --- a/indexlib/boost-compat/config/auto_link.hpp +++ b/indexlib/boost-compat/config/auto_link.hpp @@ -53,7 +53,7 @@ BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, - tqcontains one or more of the following letters after + contains one or more of the following letters after a hiphen: s static runtime (dynamic if not present). diff --git a/indexlib/boost-compat/config/platform/macos.hpp b/indexlib/boost-compat/config/platform/macos.hpp index 4893faaa..3a5f4130 100644 --- a/indexlib/boost-compat/config/platform/macos.hpp +++ b/indexlib/boost-compat/config/platform/macos.hpp @@ -53,7 +53,7 @@ # define BOOST_HAS_MPTASKS -// The MP task implementation of Boost Threads aims to tqreplace MP-unsafe +// The MP task implementation of Boost Threads aims to replace MP-unsafe // parts of the MSL, so we turn on threads unconditionally. # define BOOST_HAS_THREADS diff --git a/indexlib/boost-compat/config/requires_threads.hpp b/indexlib/boost-compat/config/requires_threads.hpp index cfaff230..d8a35777 100644 --- a/indexlib/boost-compat/config/requires_threads.hpp +++ b/indexlib/boost-compat/config/requires_threads.hpp @@ -4,8 +4,8 @@ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP -#define BOOST_CONFIG_REQUIRES_THREADS_HPP +#ifndef BOOST_CONFIG_RETQUIRES_THREADS_HPP +#define BOOST_CONFIG_RETQUIRES_THREADS_HPP #ifndef BOOST_CONFIG_HPP # include @@ -89,4 +89,4 @@ #endif // BOOST_HAS_THREADS -#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP +#endif // BOOST_CONFIG_RETQUIRES_THREADS_HPP diff --git a/indexlib/boost-compat/config/select_stdlib_config.hpp b/indexlib/boost-compat/config/select_stdlib_config.hpp index 735a03b0..b7bf5914 100644 --- a/indexlib/boost-compat/config/select_stdlib_config.hpp +++ b/indexlib/boost-compat/config/select_stdlib_config.hpp @@ -54,7 +54,7 @@ # define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp" #elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) -// Dinkumware Library (this has to appear after any possible tqreplacement libraries): +// Dinkumware Library (this has to appear after any possible replacement libraries): # define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp" #elif defined (BOOST_ASSERT_CONFIG) diff --git a/indexlib/boost-compat/config/suffix.hpp b/indexlib/boost-compat/config/suffix.hpp index a144b4fe..3d60d718 100644 --- a/indexlib/boost-compat/config/suffix.hpp +++ b/indexlib/boost-compat/config/suffix.hpp @@ -500,7 +500,7 @@ namespace boost{ // // Helper macro BOOST_STRINGIZE: -// Converts the parameter X to a string after macro tqreplacement +// Converts the parameter X to a string after macro replacement // on X has been performed. // #define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) diff --git a/indexlib/boost-compat/config/user.hpp b/indexlib/boost-compat/config/user.hpp index d595f997..c83e9af6 100644 --- a/indexlib/boost-compat/config/user.hpp +++ b/indexlib/boost-compat/config/user.hpp @@ -71,12 +71,12 @@ // #define BOOST_DISABLE_ABI_HEADERS // BOOST_ABI_PREFIX: A prefix header to include in place of whatever -// boost.config would normally select, any tqreplacement should set up +// boost.config would normally select, any replacement should set up // struct packing and tqalignment options as required. // #define BOOST_ABI_PREFIX my-header-name // BOOST_ABI_SUFFIX: A suffix header to include in place of whatever -// boost.config would normally select, any tqreplacement should undo +// boost.config would normally select, any replacement should undo // the effects of the prefix header. // #define BOOST_ABI_SUFFIX my-header-name @@ -91,7 +91,7 @@ // #define BOOST_ALL_DYN_LINK // BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll -// rather than a static library on Microsoft Windows: tqreplace the WHATEVER +// rather than a static library on Microsoft Windows: replace the WHATEVER // part of the macro name with the name of the library that you want to // dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or // BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) @@ -112,7 +112,7 @@ // BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically // select which library to link against for library "whatever", -// tqreplace WHATEVER in the macro name with the name of the library; +// replace WHATEVER in the macro name with the name of the library; // for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. // Normally if a compiler supports #pragma lib, then the correct library // build variant will be automatically selected and linked against, simply diff --git a/indexlib/boost-compat/shared_ptr.hpp b/indexlib/boost-compat/shared_ptr.hpp index 0a3bf6d8..ec88ae2e 100644 --- a/indexlib/boost-compat/shared_ptr.hpp +++ b/indexlib/boost-compat/shared_ptr.hpp @@ -445,7 +445,7 @@ template std::basic_ostream & operator<< (std:: #if (defined(__GNUC__) && (__GNUC__ < 3)) || (defined(__EDG_VERSION__) && (__EDG_VERSION__ <= 238)) // g++ 2.9x doesn't allow static_cast(void *) -// apparently EDG 2.38 also doesn't accept it +// aptqparently EDG 2.38 also doesn't accept it template D * get_deleter(shared_ptr const & p) { diff --git a/indexlib/compat.h b/indexlib/compat.h index f0dd0d18..4c3495f7 100644 --- a/indexlib/compat.h +++ b/indexlib/compat.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. @@ -51,7 +51,7 @@ struct iterator { } #endif -/* compatibility tqreplacements for functions not defined in older libstdc++ */ +/* compatibility replacements for functions not defined in older libstdc++ */ template T kMin(const T &a, const T &b) { return a < b ? a : b; } template T kMax(const T &a, const T &b) { return a > b ? a : b; } diff --git a/indexlib/compressed.cpp b/indexlib/compressed.cpp index fdcc0219..a60c3f06 100644 --- a/indexlib/compressed.cpp +++ b/indexlib/compressed.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/compressed.h b/indexlib/compressed.h index 7397c821..e583e998 100644 --- a/indexlib/compressed.h +++ b/indexlib/compressed.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/create.cpp b/indexlib/create.cpp index 1020cc26..e47d116a 100644 --- a/indexlib/create.cpp +++ b/indexlib/create.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/create.h b/indexlib/create.h index 6a495e98..e865728e 100644 --- a/indexlib/create.h +++ b/indexlib/create.h @@ -22,11 +22,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/exception.cpp b/indexlib/exception.cpp index d638a985..c48a587b 100644 --- a/indexlib/exception.cpp +++ b/indexlib/exception.cpp @@ -18,11 +18,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/exception.h b/indexlib/exception.h index 4592283f..ce5f1f2b 100644 --- a/indexlib/exception.h +++ b/indexlib/exception.h @@ -20,11 +20,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/ifile.cpp b/indexlib/ifile.cpp index ba5d7c3f..b71297a0 100644 --- a/indexlib/ifile.cpp +++ b/indexlib/ifile.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/ifile.h b/indexlib/ifile.h index db6cef90..4cfcf585 100644 --- a/indexlib/ifile.h +++ b/indexlib/ifile.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/index.h b/indexlib/index.h index 26135b9f..b7c68375 100644 --- a/indexlib/index.h +++ b/indexlib/index.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/index_slow.h b/indexlib/index_slow.h index ebe5e770..bbb4f7b7 100644 --- a/indexlib/index_slow.h +++ b/indexlib/index_slow.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/leafdata.cpp b/indexlib/leafdata.cpp index 95af29e0..70773330 100644 --- a/indexlib/leafdata.cpp +++ b/indexlib/leafdata.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/leafdata.h b/indexlib/leafdata.h index e499a2e6..fa08645e 100644 --- a/indexlib/leafdata.h +++ b/indexlib/leafdata.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/leafdatavector.cpp b/indexlib/leafdatavector.cpp index 56a3986c..0dae6555 100644 --- a/indexlib/leafdatavector.cpp +++ b/indexlib/leafdatavector.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/leafdatavector.h b/indexlib/leafdatavector.h index 60cdf943..f97ed64d 100644 --- a/indexlib/leafdatavector.h +++ b/indexlib/leafdatavector.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/lockfile.cpp b/indexlib/lockfile.cpp index d0225cda..6dfc122d 100644 --- a/indexlib/lockfile.cpp +++ b/indexlib/lockfile.cpp @@ -18,11 +18,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/lockfile.h b/indexlib/lockfile.h index 42779519..d4968498 100644 --- a/indexlib/lockfile.h +++ b/indexlib/lockfile.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/logfile.cpp b/indexlib/logfile.cpp index 49797cb5..4605030f 100644 --- a/indexlib/logfile.cpp +++ b/indexlib/logfile.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/logfile.h b/indexlib/logfile.h index 09d5e78d..b29130ef 100644 --- a/indexlib/logfile.h +++ b/indexlib/logfile.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/main.cpp b/indexlib/main.cpp index eff248b4..b8685153 100644 --- a/indexlib/main.cpp +++ b/indexlib/main.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/manager.h b/indexlib/manager.h index da321cb7..aaa08713 100644 --- a/indexlib/manager.h +++ b/indexlib/manager.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. @@ -56,12 +56,12 @@ class memory_manager { virtual void resize( unsigned ) = 0; }; -template +template struct thing_manager { public: - const unsigned char* ronly_base( unsigned idx ) const { return get_parent()->ronly_base( idx ); } - unsigned char* rw_base( unsigned idx ) const { return get_parent()->rw_base( idx ); } + const unsigned char* ronly_base( unsigned idx ) const { return get_tqparent()->ronly_base( idx ); } + unsigned char* rw_base( unsigned idx ) const { return get_tqparent()->rw_base( idx ); } }; diff --git a/indexlib/match.cpp b/indexlib/match.cpp index 03851a84..3a56c28d 100644 --- a/indexlib/match.cpp +++ b/indexlib/match.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/match.h b/indexlib/match.h index 6cbf448b..9c8fc24f 100644 --- a/indexlib/match.h +++ b/indexlib/match.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/mempool.h b/indexlib/mempool.h index e0cfc9a3..95416f08 100644 --- a/indexlib/mempool.h +++ b/indexlib/mempool.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. @@ -114,20 +114,20 @@ struct mempool /* : boost::noncopyable */ { friend struct list_node_manager; struct list_node_manager { protected: - const mempool* parent_; + const mempool* tqparent_; public: - explicit list_node_manager( const mempool* p = 0 ):parent_( p ) {} + explicit list_node_manager( const mempool* p = 0 ):tqparent_( p ) {} void* rw_base( unsigned idx ) const { - return parent_->manager_->rw_base( idx ); + return tqparent_->manager_->rw_base( idx ); } const void* ronly_base( unsigned idx ) const { - return parent_->manager_->ronly_base( idx ); + return tqparent_->manager_->ronly_base( idx ); } }; START_THING( list_node, thing ) - void set_parent( const mempool* p ) { this->parent_ = p; } + void set_tqparent( const mempool* p ) { this->tqparent_ = p; } MEMBER( uint16_t, order, 0 ) MEMBER( uint32_t, next, 2 ) MEMBER( uint32_t, prev, 6 ) diff --git a/indexlib/mempool.tcc b/indexlib/mempool.tcc index 19a5e6d4..fcb65942 100644 --- a/indexlib/mempool.tcc +++ b/indexlib/mempool.tcc @@ -142,7 +142,7 @@ template typename mempool::list_nodeptr mempool::get_node( uint32_t p ) const { assert( p ); list_nodeptr res = list_nodeptr::cast_from_uint32( p + Traits::type_offset() ); - res->set_parent( this ); + res->set_tqparent( this ); return res; } diff --git a/indexlib/memreference.h b/indexlib/memreference.h index 32c55e75..048482e0 100644 --- a/indexlib/memreference.h +++ b/indexlib/memreference.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/memvector.h b/indexlib/memvector.h index e251c447..680d2874 100644 --- a/indexlib/memvector.h +++ b/indexlib/memvector.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/mmap_manager.cpp b/indexlib/mmap_manager.cpp index 58ebd47e..7f6b1929 100644 --- a/indexlib/mmap_manager.cpp +++ b/indexlib/mmap_manager.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/mmap_manager.h b/indexlib/mmap_manager.h index eaed5d8d..a1068297 100644 --- a/indexlib/mmap_manager.h +++ b/indexlib/mmap_manager.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/path.h b/indexlib/path.h index 36e15179..013e8c46 100644 --- a/indexlib/path.h +++ b/indexlib/path.h @@ -20,11 +20,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/pointer.h b/indexlib/pointer.h index 0699be19..70721918 100644 --- a/indexlib/pointer.h +++ b/indexlib/pointer.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/quotes.cpp b/indexlib/quotes.cpp index b84ac86c..e4c35db4 100644 --- a/indexlib/quotes.cpp +++ b/indexlib/quotes.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/quotes.h b/indexlib/quotes.h index 6af33e5d..b540db63 100644 --- a/indexlib/quotes.h +++ b/indexlib/quotes.h @@ -1,5 +1,5 @@ -#ifndef LPC_QUOTES_H1108078052_INCLUDE_GUARD_ -#define LPC_QUOTES_H1108078052_INCLUDE_GUARD_ +#ifndef LPC_TQUOTES_H1108078052_INCLUDE_GUARD_ +#define LPC_TQUOTES_H1108078052_INCLUDE_GUARD_ /* This file is part of indexlib. * Copyright (C) 2005 Luís Pedro Coelho @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. @@ -58,4 +58,4 @@ struct quotes : public indexlib::index { -#endif /* LPC_QUOTES_H1108078052_INCLUDE_GUARD_ */ +#endif /* LPC_TQUOTES_H1108078052_INCLUDE_GUARD_ */ diff --git a/indexlib/result.h b/indexlib/result.h index 67ed1445..4cad40d7 100644 --- a/indexlib/result.h +++ b/indexlib/result.h @@ -22,11 +22,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/slow.cpp b/indexlib/slow.cpp index fd0e362e..73f13af7 100644 --- a/indexlib/slow.cpp +++ b/indexlib/slow.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/slow.h b/indexlib/slow.h index afa45064..2ff52f9d 100644 --- a/indexlib/slow.h +++ b/indexlib/slow.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/stringarray.cpp b/indexlib/stringarray.cpp index fb3cf733..a50a8c42 100644 --- a/indexlib/stringarray.cpp +++ b/indexlib/stringarray.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/stringarray.h b/indexlib/stringarray.h index 0994c764..a928db31 100644 --- a/indexlib/stringarray.h +++ b/indexlib/stringarray.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/stringset.cpp b/indexlib/stringset.cpp index e10885ba..511bc1e8 100644 --- a/indexlib/stringset.cpp +++ b/indexlib/stringset.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/stringset.h b/indexlib/stringset.h index 0043d7a1..3daa5d60 100644 --- a/indexlib/stringset.h +++ b/indexlib/stringset.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. @@ -129,7 +129,7 @@ struct stringset { void clear(); /** - * Returns std::make_pair( find( word ), find( word + 'Z' ) ) which makes it easy + * Returns std::make_pair( tqfind( word ), tqfind( word + 'Z' ) ) which makes it easy * to implement word* searches */ std::pair upper_lower( const char* ) const; diff --git a/indexlib/tests/ifile-test.cpp b/indexlib/tests/ifile-test.cpp index 9b9f9283..95509866 100644 --- a/indexlib/tests/ifile-test.cpp +++ b/indexlib/tests/ifile-test.cpp @@ -37,17 +37,17 @@ void simple() { cleanup(); ifile ifi( fname ); ifi.add( "this", "doc" ); - BOOST_CHECK_EQUAL( ifi.search( "this" )->list().size(), 1u ); - BOOST_CHECK_EQUAL( ifi.search( "this" )->list()[ 0 ], 0 ); - BOOST_CHECK_EQUAL( ifi.lookup_docname( ifi.search( "this" )->list()[ 0 ] ), "doc" ); + BOOST_CHECK_ETQUAL( ifi.search( "this" )->list().size(), 1u ); + BOOST_CHECK_ETQUAL( ifi.search( "this" )->list()[ 0 ], 0 ); + BOOST_CHECK_ETQUAL( ifi.lookup_docname( ifi.search( "this" )->list()[ 0 ] ), "doc" ); ifi.add( "that", "doc2" ); - BOOST_CHECK_EQUAL( ifi.search( "this" )->list().size(), 1u ); - BOOST_CHECK_EQUAL( ifi.search( "this" )->list()[ 0 ], 0 ); - BOOST_CHECK_EQUAL( ifi.lookup_docname( ifi.search( "this" )->list()[ 0 ] ), "doc" ); + BOOST_CHECK_ETQUAL( ifi.search( "this" )->list().size(), 1u ); + BOOST_CHECK_ETQUAL( ifi.search( "this" )->list()[ 0 ], 0 ); + BOOST_CHECK_ETQUAL( ifi.lookup_docname( ifi.search( "this" )->list()[ 0 ] ), "doc" ); - BOOST_CHECK_EQUAL( ifi.search( "that" )->list().size(), 1u ); - BOOST_CHECK_EQUAL( ifi.search( "that" )->list()[ 0 ], 1 ); - BOOST_CHECK_EQUAL( ifi.lookup_docname( ifi.search( "that" )->list()[ 0 ] ), "doc2" ); + BOOST_CHECK_ETQUAL( ifi.search( "that" )->list().size(), 1u ); + BOOST_CHECK_ETQUAL( ifi.search( "that" )->list()[ 0 ], 1 ); + BOOST_CHECK_ETQUAL( ifi.lookup_docname( ifi.search( "that" )->list()[ 0 ] ), "doc2" ); } void ndocs() { @@ -55,16 +55,16 @@ void ndocs() { ifile ifi( fname ); ifi.add( "one", "one" ); ifi.add( "one", "two" ); - BOOST_CHECK_EQUAL( ifi.ndocs(), 2 ); + BOOST_CHECK_ETQUAL( ifi.ndocs(), 2 ); ifi.add( "one", "three" ); ifi.add( "one", "four" ); - BOOST_CHECK_EQUAL( ifi.ndocs(), 4 ); - BOOST_CHECK_EQUAL( ifi.lookup_docname( 0 ), std::string( "one" ) ); - BOOST_CHECK_EQUAL( ifi.lookup_docname( 1 ), std::string( "two" ) ); - BOOST_CHECK_EQUAL( ifi.lookup_docname( 2 ), std::string( "three" ) ); - BOOST_CHECK_EQUAL( ifi.lookup_docname( 3 ), std::string( "four" ) ); + BOOST_CHECK_ETQUAL( ifi.ndocs(), 4 ); + BOOST_CHECK_ETQUAL( ifi.lookup_docname( 0 ), std::string( "one" ) ); + BOOST_CHECK_ETQUAL( ifi.lookup_docname( 1 ), std::string( "two" ) ); + BOOST_CHECK_ETQUAL( ifi.lookup_docname( 2 ), std::string( "three" ) ); + BOOST_CHECK_ETQUAL( ifi.lookup_docname( 3 ), std::string( "four" ) ); } void space() { @@ -72,7 +72,7 @@ void space() { ifile ifi( fname ); ifi.add( "one two three", "doc" ); - BOOST_CHECK_EQUAL( ifi.search( "two" )->list().size(), 1 ); + BOOST_CHECK_ETQUAL( ifi.search( "two" )->list().size(), 1 ); } void numbers() { @@ -80,10 +80,10 @@ void numbers() { ifile ifi( fname ); ifi.add( "one 123 123456789 four444 five", "doc" ); - BOOST_CHECK_EQUAL( ifi.search( "123" )->list().size(), 1 ); - BOOST_CHECK_EQUAL( ifi.search( "123456789" )->list().size(), 1 ); - BOOST_CHECK_EQUAL( ifi.search( "four444" )->list().size(), 1 ); - BOOST_CHECK_EQUAL( ifi.search( "five" )->list().size(), 1 ); + BOOST_CHECK_ETQUAL( ifi.search( "123" )->list().size(), 1 ); + BOOST_CHECK_ETQUAL( ifi.search( "123456789" )->list().size(), 1 ); + BOOST_CHECK_ETQUAL( ifi.search( "four444" )->list().size(), 1 ); + BOOST_CHECK_ETQUAL( ifi.search( "five" )->list().size(), 1 ); } void partial() { @@ -91,17 +91,17 @@ void partial() { ifile ifi( fname ); ifi.add( "longword", "doc_0" ); - BOOST_CHECK_EQUAL( ifi.search( "l" )->list().size(), 1u ); - BOOST_CHECK_EQUAL( ifi.search( "long" )->list().size(), 1u ); - BOOST_CHECK_EQUAL( ifi.search( "longword" )->list().size(), 1u ); + BOOST_CHECK_ETQUAL( ifi.search( "l" )->list().size(), 1u ); + BOOST_CHECK_ETQUAL( ifi.search( "long" )->list().size(), 1u ); + BOOST_CHECK_ETQUAL( ifi.search( "longword" )->list().size(), 1u ); - BOOST_CHECK_EQUAL( ifi.search( "longword" )->list().size(), 1u ); + BOOST_CHECK_ETQUAL( ifi.search( "longword" )->list().size(), 1u ); ifi.add( "longnord", "doc_1" ); - BOOST_CHECK_EQUAL( ifi.search( "l" )->list().size(), 2u ); - BOOST_CHECK_EQUAL( ifi.search( "long" )->list().size(), 2u ); - BOOST_CHECK_EQUAL( ifi.search( "longw" )->list().size(), 1u ); - BOOST_CHECK_EQUAL( ifi.search( "longn" )->list().size(), 1u ); + BOOST_CHECK_ETQUAL( ifi.search( "l" )->list().size(), 2u ); + BOOST_CHECK_ETQUAL( ifi.search( "long" )->list().size(), 2u ); + BOOST_CHECK_ETQUAL( ifi.search( "longw" )->list().size(), 1u ); + BOOST_CHECK_ETQUAL( ifi.search( "longn" )->list().size(), 1u ); } void several() { @@ -115,15 +115,15 @@ void several() { ifi.add( "else something", "5" ); ifi.add( "else four", "6" ); - BOOST_CHECK_EQUAL( count_results( ifi, "one" ), 1u ); - BOOST_CHECK_EQUAL( count_results( ifi, "one two three four" ), 1u ); - BOOST_CHECK_EQUAL( count_results( ifi, "two three four" ), 2u ); + BOOST_CHECK_ETQUAL( count_results( ifi, "one" ), 1u ); + BOOST_CHECK_ETQUAL( count_results( ifi, "one two three four" ), 1u ); + BOOST_CHECK_ETQUAL( count_results( ifi, "two three four" ), 2u ); - BOOST_CHECK_EQUAL( count_results( ifi, "one two" ), 1u ); - BOOST_CHECK_EQUAL( count_results( ifi, "one" ), 1u ); + BOOST_CHECK_ETQUAL( count_results( ifi, "one two" ), 1u ); + BOOST_CHECK_ETQUAL( count_results( ifi, "one" ), 1u ); - BOOST_CHECK_EQUAL( count_results( ifi, "something else" ), 2u ); - BOOST_CHECK_EQUAL( count_results( ifi, "something two" ), 2u ); + BOOST_CHECK_ETQUAL( count_results( ifi, "something else" ), 2u ); + BOOST_CHECK_ETQUAL( count_results( ifi, "something two" ), 2u ); } void remove_doc() { @@ -137,7 +137,7 @@ void remove_doc() { BOOST_CHECK( check_results( ifi, "one", "0", NULL ) ); BOOST_CHECK( check_results( ifi, "two", "0", NULL ) ); BOOST_CHECK( check_results( ifi, "three", "0", "2", NULL ) ); - BOOST_CHECK_EQUAL( count_results( ifi, "four" ), 0u ); + BOOST_CHECK_ETQUAL( count_results( ifi, "four" ), 0u ); } test_suite* get_suite() { diff --git a/indexlib/tests/leafdatavector-test.cpp b/indexlib/tests/leafdatavector-test.cpp index 8763327e..565717f8 100644 --- a/indexlib/tests/leafdatavector-test.cpp +++ b/indexlib/tests/leafdatavector-test.cpp @@ -14,10 +14,10 @@ void simple() { cleanup(); leafdatavector f( fname ); f.add( 0, 1 ); - BOOST_CHECK_EQUAL( f.get( 0 ).size(), 1u ); - BOOST_CHECK_EQUAL( f.get( 0 )[ 0 ], 1u ); + BOOST_CHECK_ETQUAL( f.get( 0 ).size(), 1u ); + BOOST_CHECK_ETQUAL( f.get( 0 )[ 0 ], 1u ); f.add( 0, 2 ); - BOOST_CHECK_EQUAL( f.get( 0 ).size(), 2u ); + BOOST_CHECK_ETQUAL( f.get( 0 ).size(), 2u ); } void persistent() { @@ -28,7 +28,7 @@ void persistent() { } { leafdatavector f( fname ); - BOOST_CHECK_EQUAL( f.get( 0 )[ 0 ], 1u ); + BOOST_CHECK_ETQUAL( f.get( 0 )[ 0 ], 1u ); } } @@ -48,15 +48,15 @@ void complicated() { f.add( 0, 5 ); f.add( 0, 9 ); - BOOST_CHECK_EQUAL( f.get( 0 ).size(), 6u ); - BOOST_CHECK_EQUAL( f.get( 1 ).size(), 3u ); - BOOST_CHECK_EQUAL( f.get( 2 ).size(), 2u ); + BOOST_CHECK_ETQUAL( f.get( 0 ).size(), 6u ); + BOOST_CHECK_ETQUAL( f.get( 1 ).size(), 3u ); + BOOST_CHECK_ETQUAL( f.get( 2 ).size(), 2u ); std::vector one = f.get( 1 ); std::sort( one.begin(), one.end() ); - BOOST_CHECK_EQUAL( one.size(), 3u ); - BOOST_CHECK_EQUAL( one[ 0 ], 3u ); - BOOST_CHECK_EQUAL( one[ 1 ], 5u ); - BOOST_CHECK_EQUAL( one[ 2 ], 8u ); + BOOST_CHECK_ETQUAL( one.size(), 3u ); + BOOST_CHECK_ETQUAL( one[ 0 ], 3u ); + BOOST_CHECK_ETQUAL( one[ 1 ], 5u ); + BOOST_CHECK_ETQUAL( one[ 2 ], 8u ); } void unique() { @@ -67,15 +67,15 @@ void unique() { f.add( 0, 1 ); f.add( 0, 1 ); - BOOST_CHECK_EQUAL( f.get( 0 ).size(), 1u ); + BOOST_CHECK_ETQUAL( f.get( 0 ).size(), 1u ); f.add( 0, 4 ); - BOOST_CHECK_EQUAL( f.get( 0 ).size(), 2u ); + BOOST_CHECK_ETQUAL( f.get( 0 ).size(), 2u ); f.add( 0, 1 ); f.add( 0, 4 ); - BOOST_CHECK_EQUAL( f.get( 0 ).size(), 2u ); + BOOST_CHECK_ETQUAL( f.get( 0 ).size(), 2u ); } @@ -93,7 +93,7 @@ void large() { } for ( std::map::const_iterator first = counts.begin(), past = counts.end(); first != past; ++first ) { - BOOST_CHECK_EQUAL( first->second, f.get( first->first ).size() ); + BOOST_CHECK_ETQUAL( first->second, f.get( first->first ).size() ); } } @@ -106,10 +106,10 @@ void one_zero() { f.add( 0, 1 ); f.add( 0, 3 ); - BOOST_CHECK_EQUAL( f.get( 0 ).size(), 3u ); - BOOST_CHECK_EQUAL( f.get( 0 )[ 0 ], 0u ); - BOOST_CHECK_EQUAL( f.get( 0 )[ 1 ], 1u ); - BOOST_CHECK_EQUAL( f.get( 0 )[ 2 ], 3u ); + BOOST_CHECK_ETQUAL( f.get( 0 ).size(), 3u ); + BOOST_CHECK_ETQUAL( f.get( 0 )[ 0 ], 0u ); + BOOST_CHECK_ETQUAL( f.get( 0 )[ 1 ], 1u ); + BOOST_CHECK_ETQUAL( f.get( 0 )[ 2 ], 3u ); } diff --git a/indexlib/tests/match-test.cpp b/indexlib/tests/match-test.cpp index 16b8a8e9..a1a3930f 100644 --- a/indexlib/tests/match-test.cpp +++ b/indexlib/tests/match-test.cpp @@ -11,15 +11,15 @@ void cleanup() { void simple() { cleanup(); Match m( "pat" ); - BOOST_CHECK_EQUAL( m.process( "not here" ), false ); - BOOST_CHECK_EQUAL( m.process( "p a t" ), false ); - BOOST_CHECK_EQUAL( m.process( "pa t" ), false ); + BOOST_CHECK_ETQUAL( m.process( "not here" ), false ); + BOOST_CHECK_ETQUAL( m.process( "p a t" ), false ); + BOOST_CHECK_ETQUAL( m.process( "pa t" ), false ); - BOOST_CHECK_EQUAL( m.process( "pat" ), true ); - BOOST_CHECK_EQUAL( m.process( "pattern" ), true ); - BOOST_CHECK_EQUAL( m.process( " pat " ), true ); - BOOST_CHECK_EQUAL( m.process( "zpat patx ipato " ), true ); + BOOST_CHECK_ETQUAL( m.process( "pat" ), true ); + BOOST_CHECK_ETQUAL( m.process( "pattern" ), true ); + BOOST_CHECK_ETQUAL( m.process( " pat " ), true ); + BOOST_CHECK_ETQUAL( m.process( "zpat patx ipato " ), true ); } void empty() { @@ -40,28 +40,28 @@ void string() { cleanup(); Match m( std::string( "pat" ) ); - BOOST_CHECK_EQUAL( m.process( std::string( "not here" ) ), false ); - BOOST_CHECK_EQUAL( m.process( std::string( "here pattern" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "not here" ) ), false ); + BOOST_CHECK_ETQUAL( m.process( std::string( "here pattern" ) ), true ); } void casesensitive() { cleanup(); Match m( std::string( "pat" ), ~Match::caseinsensitive ); - BOOST_CHECK_EQUAL( m.process( std::string( "PAT" ) ), false ); - BOOST_CHECK_EQUAL( m.process( std::string( "aPATa" ) ), false ); - BOOST_CHECK_EQUAL( m.process( std::string( "pAt" ) ), false ); - BOOST_CHECK_EQUAL( m.process( std::string( "pattern" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "PAT" ) ), false ); + BOOST_CHECK_ETQUAL( m.process( std::string( "aPATa" ) ), false ); + BOOST_CHECK_ETQUAL( m.process( std::string( "pAt" ) ), false ); + BOOST_CHECK_ETQUAL( m.process( std::string( "pattern" ) ), true ); } void caseinsensitive() { cleanup(); Match m( std::string( "pat" ), Match::caseinsensitive ); - BOOST_CHECK_EQUAL( m.process( std::string( "PAT" ) ), true ); - BOOST_CHECK_EQUAL( m.process( std::string( "aPATa" ) ), true ); - BOOST_CHECK_EQUAL( m.process( std::string( "pAt" ) ), true ); - BOOST_CHECK_EQUAL( m.process( std::string( "pattern" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "PAT" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "aPATa" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "pAt" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "pattern" ) ), true ); } @@ -69,16 +69,16 @@ void verylarge() { cleanup(); Match m( std::string( "pat0123456789012345678901234567890" ) ); - BOOST_CHECK_EQUAL( m.process( std::string( "pat0123456789012345678901234567890" ) ), true ); - BOOST_CHECK_EQUAL( m.process( std::string( "xxxxxxpat0123456789012345678901234567890" ) ), true ); - BOOST_CHECK_EQUAL( m.process( std::string( "xxxxxxpat0123456789012345678901234567890xxxxxxxx" ) ), true ); - BOOST_CHECK_EQUAL( m.process( std::string( "xxxxxxpat01234x6789012345678901234567890xxxxxxxx" ) ), false ); - BOOST_CHECK_EQUAL( m.process( std::string( "xxxxxxpat01234x678901234567890123456789xxxxxxxxx" ) ), false ); + BOOST_CHECK_ETQUAL( m.process( std::string( "pat0123456789012345678901234567890" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "xxxxxxpat0123456789012345678901234567890" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "xxxxxxpat0123456789012345678901234567890xxxxxxxx" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "xxxxxxpat01234x6789012345678901234567890xxxxxxxx" ) ), false ); + BOOST_CHECK_ETQUAL( m.process( std::string( "xxxxxxpat01234x678901234567890123456789xxxxxxxxx" ) ), false ); m = Match( std::string( "12345678901234567890123456789012" ) ); - BOOST_CHECK_EQUAL( m.process( std::string( "xxxxxxpat012345678901234567890123456789012xxxxxxxxx" ) ), true ); - BOOST_CHECK_EQUAL( m.process( std::string( "xxxxxxpat012345678901234567890123456789012" ) ), true ); - BOOST_CHECK_EQUAL( m.process( std::string( "xxxxxxpat01234x678901234567890123456789xxxxxxxxx" ) ), false ); + BOOST_CHECK_ETQUAL( m.process( std::string( "xxxxxxpat012345678901234567890123456789012xxxxxxxxx" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "xxxxxxpat012345678901234567890123456789012" ) ), true ); + BOOST_CHECK_ETQUAL( m.process( std::string( "xxxxxxpat01234x678901234567890123456789xxxxxxxxx" ) ), false ); } diff --git a/indexlib/tests/mempool-test.cpp b/indexlib/tests/mempool-test.cpp index a0895243..d0c4ba29 100644 --- a/indexlib/tests/mempool-test.cpp +++ b/indexlib/tests/mempool-test.cpp @@ -28,7 +28,7 @@ void deallocate() { pointers.push_back( pool.allocate( 16 ) ); leafdata::init( pointers.back() ); } - BOOST_CHECK_EQUAL( size, pool.size() ); + BOOST_CHECK_ETQUAL( size, pool.size() ); } void large() { diff --git a/indexlib/tests/memvector-test.cpp b/indexlib/tests/memvector-test.cpp index 60023a4d..648d8e46 100644 --- a/indexlib/tests/memvector-test.cpp +++ b/indexlib/tests/memvector-test.cpp @@ -19,7 +19,7 @@ void test_size() { test.push_back( 2 ); test.push_back( 3 ); test.push_back( 4 ); - BOOST_CHECK_EQUAL( test.size(), 4u ); + BOOST_CHECK_ETQUAL( test.size(), 4u ); } template @@ -30,7 +30,7 @@ void test_put_recover() { test.push_back( T( i*13 + i*i*45 + 23 ) ); } for ( int i = 0; i != 20; ++i ) { - BOOST_CHECK_EQUAL( test[ i ], T( i*13 + i*i*45 + 23 ) ); + BOOST_CHECK_ETQUAL( test[ i ], T( i*13 + i*i*45 + 23 ) ); } } @@ -39,7 +39,7 @@ void resize() { memvector test( fname ); test.push_back( 1 ); test.resize( 50 ); - BOOST_CHECK_EQUAL( test.size(), 50u ); + BOOST_CHECK_ETQUAL( test.size(), 50u ); } @@ -55,9 +55,9 @@ void test_persistent() { } { memvector test( fname ); - BOOST_CHECK_EQUAL( test.size(), 5u ); + BOOST_CHECK_ETQUAL( test.size(), 5u ); for ( unsigned i = 0; i != test.size(); ++i ) - BOOST_CHECK_EQUAL( test[ i ], i + 1 ); + BOOST_CHECK_ETQUAL( test[ i ], i + 1 ); } } @@ -71,12 +71,12 @@ void test_insert() { test.insert( test.begin() + 2, 13 ); - BOOST_CHECK_EQUAL( test.size(), 5u ); - BOOST_CHECK_EQUAL( test[ 0 ], 12u ); - BOOST_CHECK_EQUAL( test[ 1 ], 12u ); - BOOST_CHECK_EQUAL( test[ 2 ], 13u ); - BOOST_CHECK_EQUAL( test[ 3 ], 12u ); - BOOST_CHECK_EQUAL( test[ 4 ], 12u ); + BOOST_CHECK_ETQUAL( test.size(), 5u ); + BOOST_CHECK_ETQUAL( test[ 0 ], 12u ); + BOOST_CHECK_ETQUAL( test[ 1 ], 12u ); + BOOST_CHECK_ETQUAL( test[ 2 ], 13u ); + BOOST_CHECK_ETQUAL( test[ 3 ], 12u ); + BOOST_CHECK_ETQUAL( test[ 4 ], 12u ); } void test_iterator() { @@ -85,38 +85,38 @@ void test_iterator() { test.push_back( 1 ); test.push_back( 2 ); - BOOST_CHECK_EQUAL( test[ 0 ], 1u ); - BOOST_CHECK_EQUAL( test[ 1 ], 2u ); + BOOST_CHECK_ETQUAL( test[ 0 ], 1u ); + BOOST_CHECK_ETQUAL( test[ 1 ], 2u ); - BOOST_CHECK_EQUAL( *test.begin(), 1u ); - BOOST_CHECK_EQUAL( *( test.begin() + 1 ), 2u ); + BOOST_CHECK_ETQUAL( *test.begin(), 1u ); + BOOST_CHECK_ETQUAL( *( test.begin() + 1 ), 2u ); memvector::iterator iter = test.begin(); - BOOST_CHECK_EQUAL( *iter, 1u ); + BOOST_CHECK_ETQUAL( *iter, 1u ); BOOST_CHECK( test.begin() == iter ); *iter= 3; - BOOST_CHECK_EQUAL( test[ 0 ], 3u ); - BOOST_CHECK_EQUAL( *iter, 3u ); - BOOST_CHECK_EQUAL( *test.begin(), 3u ); + BOOST_CHECK_ETQUAL( test[ 0 ], 3u ); + BOOST_CHECK_ETQUAL( *iter, 3u ); + BOOST_CHECK_ETQUAL( *test.begin(), 3u ); ++iter; - BOOST_CHECK_EQUAL( *iter, 2u ); + BOOST_CHECK_ETQUAL( *iter, 2u ); *iter = 5; - BOOST_CHECK_EQUAL( *iter, 5u ); - BOOST_CHECK_EQUAL( test[ 1 ], 5u ); + BOOST_CHECK_ETQUAL( *iter, 5u ); + BOOST_CHECK_ETQUAL( test[ 1 ], 5u ); - BOOST_CHECK_EQUAL( std::distance( test.begin(), test.end() ) , test.size() ); + BOOST_CHECK_ETQUAL( std::distance( test.begin(), test.end() ) , test.size() ); test.push_back( 5 ); - BOOST_CHECK_EQUAL( std::distance( test.begin(), test.end() ) , test.size() ); + BOOST_CHECK_ETQUAL( std::distance( test.begin(), test.end() ) , test.size() ); test.push_back( 5 ); - BOOST_CHECK_EQUAL( std::distance( test.begin(), test.end() ) , test.size() ); + BOOST_CHECK_ETQUAL( std::distance( test.begin(), test.end() ) , test.size() ); } void test_iteration() { @@ -133,15 +133,15 @@ void test_iteration() { BOOST_CHECK( iter == test.begin() ); BOOST_CHECK( iter != test.end() ); - BOOST_CHECK_EQUAL( *iter, 1u ); + BOOST_CHECK_ETQUAL( *iter, 1u ); ++iter; - BOOST_CHECK_EQUAL( *iter, 2u ); + BOOST_CHECK_ETQUAL( *iter, 2u ); iter += 2; - BOOST_CHECK_EQUAL( *iter, 3u ); + BOOST_CHECK_ETQUAL( *iter, 3u ); *iter = 7; - BOOST_CHECK_EQUAL( *iter, 7u ); + BOOST_CHECK_ETQUAL( *iter, 7u ); --iter; - BOOST_CHECK_EQUAL( *iter, 5u ); + BOOST_CHECK_ETQUAL( *iter, 5u ); BOOST_CHECK( iter != test.end() ); iter += 2; BOOST_CHECK( iter == test.end() ); @@ -160,20 +160,20 @@ void test_sort() { test.push_back( 3 ); - BOOST_CHECK_EQUAL( *std::min_element( test.begin(), test.end() ), 0 ); + BOOST_CHECK_ETQUAL( *std::min_element( test.begin(), test.end() ), 0 ); BOOST_CHECK( std::min_element( test.begin(), test.end() ) == test.begin() + 1 ); - BOOST_CHECK_EQUAL( *std::max_element( test.begin(), test.end() ), 14 ); + BOOST_CHECK_ETQUAL( *std::max_element( test.begin(), test.end() ), 14 ); BOOST_CHECK( std::max_element( test.begin(), test.end() ) == test.begin() + 2 ); std::sort( test.begin(), test.end() ); - BOOST_CHECK_EQUAL( test[ 0 ], 0 ); - BOOST_CHECK_EQUAL( test[ 1 ], 3 ); - BOOST_CHECK_EQUAL( test[ 2 ], 4 ); - BOOST_CHECK_EQUAL( test[ 3 ], 5 ); - BOOST_CHECK_EQUAL( test[ 4 ], 8 ); - BOOST_CHECK_EQUAL( test[ 5 ], 10 ); - BOOST_CHECK_EQUAL( test[ 6 ], 12 ); - BOOST_CHECK_EQUAL( test[ 7 ], 14 ); + BOOST_CHECK_ETQUAL( test[ 0 ], 0 ); + BOOST_CHECK_ETQUAL( test[ 1 ], 3 ); + BOOST_CHECK_ETQUAL( test[ 2 ], 4 ); + BOOST_CHECK_ETQUAL( test[ 3 ], 5 ); + BOOST_CHECK_ETQUAL( test[ 4 ], 8 ); + BOOST_CHECK_ETQUAL( test[ 5 ], 10 ); + BOOST_CHECK_ETQUAL( test[ 6 ], 12 ); + BOOST_CHECK_ETQUAL( test[ 7 ], 14 ); } void remove() { @@ -181,11 +181,11 @@ void remove() { cleanup(); memvector test( fname ); test.push_back( 1 ); - BOOST_CHECK_EQUAL( test.size(), 1 ); + BOOST_CHECK_ETQUAL( test.size(), 1 ); } memvector::remove( fname ); memvector test( fname ); - BOOST_CHECK_EQUAL( test.size(), 0 ); + BOOST_CHECK_ETQUAL( test.size(), 0 ); } void assign() { @@ -193,7 +193,7 @@ void assign() { memvector test( fname ); test.push_back( 2 ); test[ 0 ] = 3; - BOOST_CHECK_EQUAL( test[ 0 ], 3u ); + BOOST_CHECK_ETQUAL( test[ 0 ], 3u ); } void erase() { @@ -205,20 +205,20 @@ void erase() { test.push_back( 16 ); test.push_back( 32 ); - BOOST_CHECK_EQUAL( test.size(), 5u ); + BOOST_CHECK_ETQUAL( test.size(), 5u ); test.erase( test.begin() + 1 ); - BOOST_CHECK_EQUAL( test[ 0 ], 2u ); - BOOST_CHECK_EQUAL( test[ 1 ], 8u ); - BOOST_CHECK_EQUAL( test[ 2 ], 16u ); - BOOST_CHECK_EQUAL( test[ 3 ], 32u ); - BOOST_CHECK_EQUAL( test.size(), 4u ); + BOOST_CHECK_ETQUAL( test[ 0 ], 2u ); + BOOST_CHECK_ETQUAL( test[ 1 ], 8u ); + BOOST_CHECK_ETQUAL( test[ 2 ], 16u ); + BOOST_CHECK_ETQUAL( test[ 3 ], 32u ); + BOOST_CHECK_ETQUAL( test.size(), 4u ); test.erase( test.begin() + 3 ); - BOOST_CHECK_EQUAL( test[ 0 ], 2u ); - BOOST_CHECK_EQUAL( test[ 1 ], 8u ); - BOOST_CHECK_EQUAL( test[ 2 ], 16u ); - BOOST_CHECK_EQUAL( test.size(), 3u ); + BOOST_CHECK_ETQUAL( test[ 0 ], 2u ); + BOOST_CHECK_ETQUAL( test[ 1 ], 8u ); + BOOST_CHECK_ETQUAL( test[ 2 ], 16u ); + BOOST_CHECK_ETQUAL( test.size(), 3u ); } @@ -234,7 +234,7 @@ void clear() { test.clear(); - BOOST_CHECK_EQUAL( test.size(), 0u ); + BOOST_CHECK_ETQUAL( test.size(), 0u ); } test_suite* get_suite() { diff --git a/indexlib/tests/stringarray-test.cpp b/indexlib/tests/stringarray-test.cpp index d0f5ecef..110b82c9 100644 --- a/indexlib/tests/stringarray-test.cpp +++ b/indexlib/tests/stringarray-test.cpp @@ -17,21 +17,21 @@ void test_size() { test.add( "one" ); test.add( "one" ); test.add( "one" ); - //BOOST_CHECK_EQUAL( test.size(), 4 ); + //BOOST_CHECK_ETQUAL( test.size(), 4 ); cleanup(); } void test_put_recover() { stringarray test( fname ); - BOOST_CHECK_EQUAL( test.add( "one" ), 0 ); - BOOST_CHECK_EQUAL( test.add( "two" ), 1 ); - BOOST_CHECK_EQUAL( test.add( "three" ), 2 ); - BOOST_CHECK_EQUAL( test.add( "four" ), 3 ); + BOOST_CHECK_ETQUAL( test.add( "one" ), 0 ); + BOOST_CHECK_ETQUAL( test.add( "two" ), 1 ); + BOOST_CHECK_ETQUAL( test.add( "three" ), 2 ); + BOOST_CHECK_ETQUAL( test.add( "four" ), 3 ); - BOOST_CHECK_EQUAL( test.get( 0 ), "one" ); - BOOST_CHECK_EQUAL( test.get( 1 ), "two" ); - BOOST_CHECK_EQUAL( test.get( 2 ), "three" ); - BOOST_CHECK_EQUAL( test.get( 3 ), "four" ); + BOOST_CHECK_ETQUAL( test.get( 0 ), "one" ); + BOOST_CHECK_ETQUAL( test.get( 1 ), "two" ); + BOOST_CHECK_ETQUAL( test.get( 2 ), "three" ); + BOOST_CHECK_ETQUAL( test.get( 3 ), "four" ); cleanup(); } @@ -39,19 +39,19 @@ void test_put_recover() { void test_persistent() { { stringarray test( fname ); - BOOST_CHECK_EQUAL( test.add( "one" ), 0 ); - BOOST_CHECK_EQUAL( test.add( "two" ), 1 ); - BOOST_CHECK_EQUAL( test.add( "three" ), 2 ); - BOOST_CHECK_EQUAL( test.add( "four" ), 3 ); + BOOST_CHECK_ETQUAL( test.add( "one" ), 0 ); + BOOST_CHECK_ETQUAL( test.add( "two" ), 1 ); + BOOST_CHECK_ETQUAL( test.add( "three" ), 2 ); + BOOST_CHECK_ETQUAL( test.add( "four" ), 3 ); } { stringarray test( fname ); - //BOOST_CHECK_EQUAL( test.size(), 4 ); - BOOST_CHECK_EQUAL( test.get( 0 ), "one" ); - BOOST_CHECK_EQUAL( test.get( 1 ), "two" ); - BOOST_CHECK_EQUAL( test.get( 2 ), "three" ); - BOOST_CHECK_EQUAL( test.get( 3 ), "four" ); + //BOOST_CHECK_ETQUAL( test.size(), 4 ); + BOOST_CHECK_ETQUAL( test.get( 0 ), "one" ); + BOOST_CHECK_ETQUAL( test.get( 1 ), "two" ); + BOOST_CHECK_ETQUAL( test.get( 2 ), "three" ); + BOOST_CHECK_ETQUAL( test.get( 3 ), "four" ); } cleanup(); @@ -83,9 +83,9 @@ void erase() { test.add( "four" ); test.erase( 1 ); - BOOST_CHECK_EQUAL( test.get( 0 ), "one" ); - BOOST_CHECK_EQUAL( test.get( 1 ), "three" ); - BOOST_CHECK_EQUAL( test.size(), 3u ); + BOOST_CHECK_ETQUAL( test.get( 0 ), "one" ); + BOOST_CHECK_ETQUAL( test.get( 1 ), "three" ); + BOOST_CHECK_ETQUAL( test.size(), 3u ); cleanup(); } diff --git a/indexlib/tests/stringset-test.cpp b/indexlib/tests/stringset-test.cpp index 56d32695..8aed8615 100644 --- a/indexlib/tests/stringset-test.cpp +++ b/indexlib/tests/stringset-test.cpp @@ -56,11 +56,11 @@ void iterator() { stringset::const_iterator iter = set.begin(); - BOOST_CHECK_EQUAL( std::string( "string" ), *iter ); - BOOST_CHECK_EQUAL( set.begin(), iter ); + BOOST_CHECK_ETQUAL( std::string( "string" ), *iter ); + BOOST_CHECK_ETQUAL( set.begin(), iter ); BOOST_CHECK( !( set.end() == iter ) ); ++iter; - BOOST_CHECK_EQUAL( set.end(), iter ); + BOOST_CHECK_ETQUAL( set.end(), iter ); } void order() { @@ -73,49 +73,49 @@ void order() { stringset::const_iterator iter = set.begin(); - BOOST_CHECK_EQUAL( *iter, std::string( "one" ) ); + BOOST_CHECK_ETQUAL( *iter, std::string( "one" ) ); ++iter; - BOOST_CHECK_EQUAL( *iter, std::string( "two" ) ); + BOOST_CHECK_ETQUAL( *iter, std::string( "two" ) ); ++iter; - BOOST_CHECK_EQUAL( *iter, std::string( "wlast" ) ); + BOOST_CHECK_ETQUAL( *iter, std::string( "wlast" ) ); ++iter; - BOOST_CHECK_EQUAL( iter, set.end() ); + BOOST_CHECK_ETQUAL( iter, set.end() ); } void order_of() { cleanup(); stringset set( fname ); set.add( "one" ); - BOOST_CHECK_EQUAL( set.order_of( "one" ), 0 ); - BOOST_CHECK_EQUAL( set.order_of( "two" ), unsigned( -1 ) ); + BOOST_CHECK_ETQUAL( set.order_of( "one" ), 0 ); + BOOST_CHECK_ETQUAL( set.order_of( "two" ), unsigned( -1 ) ); set.add( "two" ); - BOOST_CHECK_EQUAL( set.order_of( "two" ), 1 ); + BOOST_CHECK_ETQUAL( set.order_of( "two" ), 1 ); set.add( "before" ); - BOOST_CHECK_EQUAL( set.order_of( "two" ), 2 ); - BOOST_CHECK_EQUAL( set.order_of( "one" ), 1 ); - BOOST_CHECK_EQUAL( set.order_of( "before" ), 0 ); + BOOST_CHECK_ETQUAL( set.order_of( "two" ), 2 ); + BOOST_CHECK_ETQUAL( set.order_of( "one" ), 1 ); + BOOST_CHECK_ETQUAL( set.order_of( "before" ), 0 ); } void id_of() { cleanup(); stringset set( fname ); set.add( "one" ); - BOOST_CHECK_EQUAL( set.id_of( "one" ), 0 ); - BOOST_CHECK_EQUAL( set.id_of( "two" ), unsigned( -1 ) ); + BOOST_CHECK_ETQUAL( set.id_of( "one" ), 0 ); + BOOST_CHECK_ETQUAL( set.id_of( "two" ), unsigned( -1 ) ); set.add( "two" ); - BOOST_CHECK_EQUAL( set.id_of( "two" ), 1 ); + BOOST_CHECK_ETQUAL( set.id_of( "two" ), 1 ); set.add( "before" ); - BOOST_CHECK_EQUAL( set.id_of( "two" ), 1 ); - BOOST_CHECK_EQUAL( set.id_of( "one" ), 0 ); - BOOST_CHECK_EQUAL( set.id_of( "before" ), 2 ); + BOOST_CHECK_ETQUAL( set.id_of( "two" ), 1 ); + BOOST_CHECK_ETQUAL( set.id_of( "one" ), 0 ); + BOOST_CHECK_ETQUAL( set.id_of( "before" ), 2 ); } void add_return() { cleanup(); stringset set( fname ); - BOOST_CHECK_EQUAL( set.add( "one" ), 0 ); - BOOST_CHECK_EQUAL( set.add( "two" ), 1 ); - BOOST_CHECK_EQUAL( set.add( "before" ), 2 ); + BOOST_CHECK_ETQUAL( set.add( "one" ), 0 ); + BOOST_CHECK_ETQUAL( set.add( "two" ), 1 ); + BOOST_CHECK_ETQUAL( set.add( "before" ), 2 ); } void lower() { @@ -127,8 +127,8 @@ void lower() { set.add( "abc" ); set.add( "acc" ); - BOOST_CHECK_EQUAL( std::string( *set.lower_bound( "ab" ) ), "aba" ); - BOOST_CHECK_EQUAL( std::string( *set.lower_bound( "abz" ) ), "acc" ); + BOOST_CHECK_ETQUAL( std::string( *set.lower_bound( "ab" ) ), "aba" ); + BOOST_CHECK_ETQUAL( std::string( *set.lower_bound( "abz" ) ), "acc" ); } void lower_upper() { @@ -146,19 +146,19 @@ void lower_upper() { limits = set.upper_lower( "ab" ); - BOOST_CHECK_EQUAL( std::distance( upper, lower ), 2u ); - BOOST_CHECK_EQUAL( std::string( *upper ), "aba" ); + BOOST_CHECK_ETQUAL( std::distance( upper, lower ), 2u ); + BOOST_CHECK_ETQUAL( std::string( *upper ), "aba" ); ++upper; - BOOST_CHECK_EQUAL( std::string( *upper ), "abc" ); + BOOST_CHECK_ETQUAL( std::string( *upper ), "abc" ); ++upper; BOOST_CHECK( upper == lower ); limits = set.upper_lower( "abc" ); - BOOST_CHECK_EQUAL( std::distance( upper, lower ), 1u ); - BOOST_CHECK_EQUAL( std::string( *upper ), "abc" ); + BOOST_CHECK_ETQUAL( std::distance( upper, lower ), 1u ); + BOOST_CHECK_ETQUAL( std::string( *upper ), "abc" ); limits = set.upper_lower( "abz" ); - BOOST_CHECK_EQUAL( std::distance( upper, lower ), 0u ); + BOOST_CHECK_ETQUAL( std::distance( upper, lower ), 0u ); } void clear() { @@ -171,7 +171,7 @@ void clear() { set.add( "three" ); set.clear(); - BOOST_CHECK_EQUAL( set.size(), 0u ); + BOOST_CHECK_ETQUAL( set.size(), 0u ); } test_suite* get_suite() { diff --git a/indexlib/tests/testdriver.cpp b/indexlib/tests/testdriver.cpp index db11e036..2548fd46 100644 --- a/indexlib/tests/testdriver.cpp +++ b/indexlib/tests/testdriver.cpp @@ -18,11 +18,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. diff --git a/indexlib/tests/tokenizer-test.cpp b/indexlib/tests/tokenizer-test.cpp index 372859d9..b5b10f39 100644 --- a/indexlib/tests/tokenizer-test.cpp +++ b/indexlib/tests/tokenizer-test.cpp @@ -19,9 +19,9 @@ void simple() { expected.push_back( "AAACE" ); std::sort( tokens.begin(), tokens.end() ); std::sort( expected.begin(), expected.end() ); - BOOST_CHECK_EQUAL( expected.size(), tokens.size() ); + BOOST_CHECK_ETQUAL( expected.size(), tokens.size() ); for ( int i = 0; i < expected.size() && i < tokens.size(); ++i ) { - BOOST_CHECK_EQUAL( expected[ i ], tokens[ i ] ); + BOOST_CHECK_ETQUAL( expected[ i ], tokens[ i ] ); } } @@ -35,9 +35,9 @@ void with_newlines() { expected.push_back( "THREE" ); std::sort( tokens.begin(), tokens.end() ); std::sort( expected.begin(), expected.end() ); - BOOST_CHECK_EQUAL( expected.size(), tokens.size() ); + BOOST_CHECK_ETQUAL( expected.size(), tokens.size() ); for ( int i = 0; i < expected.size() && i < tokens.size(); ++i ) { - BOOST_CHECK_EQUAL( expected.at( i ), tokens.at( i ) ); + BOOST_CHECK_ETQUAL( expected.at( i ), tokens.at( i ) ); } } @@ -52,9 +52,9 @@ void with_numbers() { expected.push_back( "FOUR" ); std::sort( tokens.begin(), tokens.end() ); std::sort( expected.begin(), expected.end() ); - BOOST_CHECK_EQUAL( expected.size(), tokens.size() ); + BOOST_CHECK_ETQUAL( expected.size(), tokens.size() ); for ( int i = 0; i < expected.size() && i < tokens.size(); ++i ) { - BOOST_CHECK_EQUAL( expected.at( i ), tokens.at( i ) ); + BOOST_CHECK_ETQUAL( expected.at( i ), tokens.at( i ) ); } } diff --git a/indexlib/thing.h b/indexlib/thing.h index 26afb07b..923bad33 100644 --- a/indexlib/thing.h +++ b/indexlib/thing.h @@ -21,11 +21,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. -- cgit v1.2.3