summaryrefslogtreecommitdiffstats
path: root/indexlib/tests/stringset-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indexlib/tests/stringset-test.cpp')
-rw-r--r--indexlib/tests/stringset-test.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/indexlib/tests/stringset-test.cpp b/indexlib/tests/stringset-test.cpp
index 8aed86150..56d326950 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_ETQUAL( std::string( "string" ), *iter );
- BOOST_CHECK_ETQUAL( set.begin(), iter );
+ BOOST_CHECK_EQUAL( std::string( "string" ), *iter );
+ BOOST_CHECK_EQUAL( set.begin(), iter );
BOOST_CHECK( !( set.end() == iter ) );
++iter;
- BOOST_CHECK_ETQUAL( set.end(), iter );
+ BOOST_CHECK_EQUAL( set.end(), iter );
}
void order() {
@@ -73,49 +73,49 @@ void order() {
stringset::const_iterator iter = set.begin();
- BOOST_CHECK_ETQUAL( *iter, std::string( "one" ) );
+ BOOST_CHECK_EQUAL( *iter, std::string( "one" ) );
++iter;
- BOOST_CHECK_ETQUAL( *iter, std::string( "two" ) );
+ BOOST_CHECK_EQUAL( *iter, std::string( "two" ) );
++iter;
- BOOST_CHECK_ETQUAL( *iter, std::string( "wlast" ) );
+ BOOST_CHECK_EQUAL( *iter, std::string( "wlast" ) );
++iter;
- BOOST_CHECK_ETQUAL( iter, set.end() );
+ BOOST_CHECK_EQUAL( iter, set.end() );
}
void order_of() {
cleanup();
stringset set( fname );
set.add( "one" );
- BOOST_CHECK_ETQUAL( set.order_of( "one" ), 0 );
- BOOST_CHECK_ETQUAL( set.order_of( "two" ), unsigned( -1 ) );
+ BOOST_CHECK_EQUAL( set.order_of( "one" ), 0 );
+ BOOST_CHECK_EQUAL( set.order_of( "two" ), unsigned( -1 ) );
set.add( "two" );
- BOOST_CHECK_ETQUAL( set.order_of( "two" ), 1 );
+ BOOST_CHECK_EQUAL( set.order_of( "two" ), 1 );
set.add( "before" );
- BOOST_CHECK_ETQUAL( set.order_of( "two" ), 2 );
- BOOST_CHECK_ETQUAL( set.order_of( "one" ), 1 );
- BOOST_CHECK_ETQUAL( set.order_of( "before" ), 0 );
+ BOOST_CHECK_EQUAL( set.order_of( "two" ), 2 );
+ BOOST_CHECK_EQUAL( set.order_of( "one" ), 1 );
+ BOOST_CHECK_EQUAL( set.order_of( "before" ), 0 );
}
void id_of() {
cleanup();
stringset set( fname );
set.add( "one" );
- BOOST_CHECK_ETQUAL( set.id_of( "one" ), 0 );
- BOOST_CHECK_ETQUAL( set.id_of( "two" ), unsigned( -1 ) );
+ BOOST_CHECK_EQUAL( set.id_of( "one" ), 0 );
+ BOOST_CHECK_EQUAL( set.id_of( "two" ), unsigned( -1 ) );
set.add( "two" );
- BOOST_CHECK_ETQUAL( set.id_of( "two" ), 1 );
+ BOOST_CHECK_EQUAL( set.id_of( "two" ), 1 );
set.add( "before" );
- BOOST_CHECK_ETQUAL( set.id_of( "two" ), 1 );
- BOOST_CHECK_ETQUAL( set.id_of( "one" ), 0 );
- BOOST_CHECK_ETQUAL( set.id_of( "before" ), 2 );
+ BOOST_CHECK_EQUAL( set.id_of( "two" ), 1 );
+ BOOST_CHECK_EQUAL( set.id_of( "one" ), 0 );
+ BOOST_CHECK_EQUAL( set.id_of( "before" ), 2 );
}
void add_return() {
cleanup();
stringset set( fname );
- BOOST_CHECK_ETQUAL( set.add( "one" ), 0 );
- BOOST_CHECK_ETQUAL( set.add( "two" ), 1 );
- BOOST_CHECK_ETQUAL( set.add( "before" ), 2 );
+ BOOST_CHECK_EQUAL( set.add( "one" ), 0 );
+ BOOST_CHECK_EQUAL( set.add( "two" ), 1 );
+ BOOST_CHECK_EQUAL( set.add( "before" ), 2 );
}
void lower() {
@@ -127,8 +127,8 @@ void lower() {
set.add( "abc" );
set.add( "acc" );
- BOOST_CHECK_ETQUAL( std::string( *set.lower_bound( "ab" ) ), "aba" );
- BOOST_CHECK_ETQUAL( std::string( *set.lower_bound( "abz" ) ), "acc" );
+ BOOST_CHECK_EQUAL( std::string( *set.lower_bound( "ab" ) ), "aba" );
+ BOOST_CHECK_EQUAL( std::string( *set.lower_bound( "abz" ) ), "acc" );
}
void lower_upper() {
@@ -146,19 +146,19 @@ void lower_upper() {
limits = set.upper_lower( "ab" );
- BOOST_CHECK_ETQUAL( std::distance( upper, lower ), 2u );
- BOOST_CHECK_ETQUAL( std::string( *upper ), "aba" );
+ BOOST_CHECK_EQUAL( std::distance( upper, lower ), 2u );
+ BOOST_CHECK_EQUAL( std::string( *upper ), "aba" );
++upper;
- BOOST_CHECK_ETQUAL( std::string( *upper ), "abc" );
+ BOOST_CHECK_EQUAL( std::string( *upper ), "abc" );
++upper;
BOOST_CHECK( upper == lower );
limits = set.upper_lower( "abc" );
- BOOST_CHECK_ETQUAL( std::distance( upper, lower ), 1u );
- BOOST_CHECK_ETQUAL( std::string( *upper ), "abc" );
+ BOOST_CHECK_EQUAL( std::distance( upper, lower ), 1u );
+ BOOST_CHECK_EQUAL( std::string( *upper ), "abc" );
limits = set.upper_lower( "abz" );
- BOOST_CHECK_ETQUAL( std::distance( upper, lower ), 0u );
+ BOOST_CHECK_EQUAL( std::distance( upper, lower ), 0u );
}
void clear() {
@@ -171,7 +171,7 @@ void clear() {
set.add( "three" );
set.clear();
- BOOST_CHECK_ETQUAL( set.size(), 0u );
+ BOOST_CHECK_EQUAL( set.size(), 0u );
}
test_suite* get_suite() {