[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdepim/indexlib/tests
From: Luís Pedro Coelho <luis () luispedro ! org>
Date: 2006-09-05 0:48:40
Message-ID: 1157417320.946314.26186.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 581012 by luis_pedro:
Cleanup at the end of each test
M +6 -5 stringarray-test.cpp
--- branches/KDE/3.5/kdepim/indexlib/tests/stringarray-test.cpp #581011:581012
@@ -12,17 +12,16 @@
}
void test_size() {
- cleanup();
stringarray test( fname );
test.add( "one" );
test.add( "one" );
test.add( "one" );
test.add( "one" );
//BOOST_CHECK_EQUAL( test.size(), 4 );
+ cleanup();
}
void test_put_recover() {
- cleanup();
stringarray test( fname );
BOOST_CHECK_EQUAL( test.add( "one" ), 0 );
BOOST_CHECK_EQUAL( test.add( "two" ), 1 );
@@ -34,10 +33,10 @@
BOOST_CHECK_EQUAL( test.get( 2 ), "three" );
BOOST_CHECK_EQUAL( test.get( 3 ), "four" );
+ cleanup();
}
void test_persistent() {
- cleanup();
{
stringarray test( fname );
BOOST_CHECK_EQUAL( test.add( "one" ), 0 );
@@ -55,10 +54,10 @@
BOOST_CHECK_EQUAL( test.get( 3 ), "four" );
}
+ cleanup();
}
void cstr() {
- cleanup();
stringarray test( fname );
test.add( "one" );
@@ -72,10 +71,10 @@
BOOST_CHECK( !strcmp( test.get_cstr( 2 ), "three" ) );
BOOST_CHECK( !strcmp( test.get_cstr( 3 ), "four" ) );
+ cleanup();
}
void erase() {
- cleanup();
stringarray test( fname );
test.add( "one" );
@@ -87,8 +86,10 @@
BOOST_CHECK_EQUAL( test.get( 0 ), "one" );
BOOST_CHECK_EQUAL( test.get( 1 ), "three" );
BOOST_CHECK_EQUAL( test.size(), 3u );
+ cleanup();
}
+
test_suite* get_suite() {
test_suite* test = BOOST_TEST_SUITE( "Memvector tests" );
test->add( BOOST_TEST_CASE( &test_size ) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic