diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /indexlib/tests/ifile-test.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
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
Diffstat (limited to 'indexlib/tests/ifile-test.cpp')
-rw-r--r-- | indexlib/tests/ifile-test.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/indexlib/tests/ifile-test.cpp b/indexlib/tests/ifile-test.cpp index 9b9f92832..955098663 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() { |