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/match-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/match-test.cpp')
| -rw-r--r-- | indexlib/tests/match-test.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
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 ); } |
