libmoost
/home/mhx/git/github/libmoost/test/kvds/kvds.cpp
Go to the documentation of this file.
00001 /* vim:set ts=3 sw=3 sts=3 et: */
00028 // Include boost test framework required headers
00029 #include <boost/test/unit_test.hpp>
00030 #include <boost/test/test_tools.hpp>
00031 
00032 #include <boost/lexical_cast.hpp>
00033 
00034 // Include CRT/STL required header(s)
00035 #include <stdexcept>
00036 #include <set>
00037 
00038 #include <boost/cstdint.hpp>
00039 
00040 #include "../../include/moost/testing/test_directory_creator.hpp"
00041 #include "../../include/moost/utils/foreach.hpp"
00042 
00043 // Include thrift headers
00044 
00045 // Include application required header(s)
00046 #include "../../include/moost/kvds.hpp"
00047 
00048 // This header contains some test data
00049 #include "testdata.h"
00050 
00051 // Imported required namespace(s)
00052 using namespace boost;
00053 using namespace moost::kvds;
00054 using namespace moost::testing;
00055 
00056 // Name the test suite
00057 BOOST_AUTO_TEST_SUITE( kvdsTest )
00058 
00059 // Define the test fixture
00060 struct Fixture
00061 {
00062    test_directory_creator tdc;
00063 
00064    // C_tor
00065    Fixture()
00066    {
00067    }
00068 
00069    // D_tor
00070    ~Fixture()
00071    {
00072    }
00073 };
00074 
00075 template <typename kvdsT>
00076 class KvdsTester
00077 {
00078    // NB. We use BOOST_REQUIRE since each test is dependent on the previous one working.
00079    //     This is to avoid having to re-populate the datastore for each test (save time).
00080 
00081    typedef kvdsT kvds_type;
00082 
00083    static uint32_t const val0_mask = 0xF1E2D3C4;
00084    static uint32_t const val1_mask = 0x12345678;
00085 
00086    void test_get_noexist(kvds_type & kvds)
00087    {
00088       // These should ALL fail.
00089 
00090       uint32_t val = 0;
00091 
00092       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00093       {
00094          for(uint32_t val_put = 1 ; val_put != 0 ; val_put <<= 1)
00095          {
00096             BOOST_REQUIRE(!kvds.get(key, val));
00097          }
00098       }
00099    }
00100 
00101    void test_size(kvds_type & kvds, size_t const size, bool const bExists = true)
00102    {
00103       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00104       {
00105          size_t vsize;
00106          BOOST_REQUIRE(bExists == kvds.size(key, vsize));
00107 
00108          BOOST_REQUIRE(!bExists == kvds.empty());
00109 
00110          if(bExists)
00111          {
00112             BOOST_REQUIRE(size == vsize);
00113          }
00114       }
00115    }
00116 
00117    void test_add_cnt_get(kvds_type & kvds)
00118    {
00119       uint32_t const val_add_mask = 0x12345678;
00120       uint64_t ecnt = 0;
00121 
00122       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00123       {
00124          uint32_t const val_add = key ^ val_add_mask;
00125          uint32_t val_get = 0;
00126 
00127          uint64_t cnt = 0;
00128          BOOST_REQUIRE(kvds.count(cnt));
00129          BOOST_REQUIRE(ecnt == cnt);
00130          BOOST_REQUIRE(kvds.add(key, val_add));
00131          BOOST_REQUIRE(kvds.count(cnt));
00132          BOOST_REQUIRE(++ecnt == cnt);
00133 
00134          BOOST_REQUIRE(kvds.get(key, val_get));
00135          BOOST_REQUIRE(val_add == val_get);
00136       }
00137    }
00138 
00139    void test_put_cnt_get(kvds_type & kvds, bool bCheckCnt = true)
00140    {
00141       uint32_t const val_put_mask = val0_mask;
00142       uint32_t ecnt = 0;
00143 
00144       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00145       {
00146          uint32_t const val_put = key ^ val_put_mask;
00147          uint32_t val_get = 0;
00148 
00149          if(bCheckCnt)
00150          {
00151             uint64_t cnt = 0;
00152             BOOST_REQUIRE(kvds.count(cnt));
00153             BOOST_REQUIRE(ecnt == cnt);
00154          }
00155 
00156          BOOST_REQUIRE(kvds.put(key, val_put));
00157 
00158          if(bCheckCnt)
00159          {
00160             uint64_t cnt = 0;
00161             BOOST_REQUIRE(kvds.count(cnt));
00162             BOOST_REQUIRE(++ecnt == cnt);
00163          }
00164 
00165          BOOST_REQUIRE(kvds.get(key, val_get));
00166          BOOST_REQUIRE(val_put == val_get);
00167       }
00168    }
00169 
00170    void test_add_get(kvds_type & kvds)
00171    {
00172       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00173       {
00174          uint32_t const val_add = key ^ val1_mask;
00175          typename kvds_type::kvds_values_t vals_all;
00176 
00177          BOOST_REQUIRE(kvds.add(key, val_add));
00178          BOOST_REQUIRE(kvds.get(key, vals_all));
00179          BOOST_REQUIRE(vals_all.size() == 2);
00180          BOOST_REQUIRE((key ^ val0_mask) == vals_all[0]);
00181          BOOST_REQUIRE((key ^ val1_mask) == vals_all[1]);
00182       }
00183    }
00184 
00185    void test_get_all(kvds_type & kvds)
00186    {
00187       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00188       {
00189          for(int testcase = 0 ; testcase < 2 ; ++testcase)
00190          {
00191             typename kvds_type::kvds_values_t vals_all;
00192 
00193             switch(testcase)
00194             {
00195             case 0 : // key not found
00196                {
00197                   uint32_t badkey = ~key;
00198                   BOOST_REQUIRE(!kvds.get(badkey, vals_all));
00199                   BOOST_REQUIRE(vals_all.empty());
00200                }
00201                break;
00202             case 1 : // key found and value correct size
00203                {
00204                   BOOST_REQUIRE(kvds.get(key, vals_all));
00205                   BOOST_REQUIRE(vals_all.size() == 2);
00206                   BOOST_REQUIRE((key ^ val0_mask) == vals_all[0]);
00207                   BOOST_REQUIRE((key ^ val1_mask) == vals_all[1]);
00208                }
00209                break;
00210             default:
00211                throw std::runtime_error("Unknown test case for test_get_all()");
00212             }
00213          }
00214       }
00215    }
00216 
00217    void test_get_few(kvds_type & kvds)
00218    {
00219       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00220       {
00221          for(size_t cnt = 0 ; cnt < 3 ; ++cnt)
00222          {
00223             for(int testcase = 0 ; testcase < 2 ; ++testcase)
00224             {
00225                typename kvds_type::kvds_values_t vals(cnt);
00226 
00227                switch(testcase)
00228                {
00229                case 0 : // key not found
00230                   {
00231                      uint32_t badkey = ~key;
00232                      BOOST_REQUIRE(!kvds.get(badkey, vals, cnt));
00233                      BOOST_REQUIRE(vals.size() == cnt);
00234                   }
00235                   break;
00236                case 1 : // key found and value correct size
00237                   {
00238                      BOOST_REQUIRE(kvds.get(key, vals, cnt) == ((0 == cnt) ? false : true));
00239                      BOOST_REQUIRE(vals.size() == cnt);
00240                      BOOST_REQUIRE(cnt > 0 ? (key ^ val0_mask) == vals[0] : true);
00241                      BOOST_REQUIRE(cnt > 1 ? (key ^ val1_mask) == vals[1] : true);
00242                   }
00243                   break;
00244                default:
00245                   throw std::runtime_error("Unknown test case for test_get_few()");
00246                }
00247             }
00248          }
00249       }
00250    }
00251 
00252    void test_put_get(kvds_type & kvds)
00253    {
00254       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00255       {
00256          typename kvds_type::kvds_values_t put_vals;
00257          put_vals.push_back(key ^ val0_mask);
00258          put_vals.push_back(key ^ val1_mask);
00259 
00260          typename kvds_type::kvds_values_t get_vals;
00261 
00262          BOOST_REQUIRE(!kvds.get(key, get_vals));
00263          BOOST_REQUIRE(get_vals.empty());
00264 
00265          BOOST_REQUIRE(kvds.put(key, put_vals));
00266 
00267          BOOST_REQUIRE(kvds.get(key, get_vals));
00268          BOOST_REQUIRE(!get_vals.empty());
00269          BOOST_REQUIRE(2 == get_vals.size());
00270          BOOST_REQUIRE(get_vals[0] == put_vals[0]);
00271          BOOST_REQUIRE(get_vals[1] == put_vals[1]);
00272       }
00273    }
00274 
00275    void test_exist_erase(kvds_type & kvds)
00276    {
00277       BOOST_REQUIRE(!kvds.empty());
00278 
00279       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00280       {
00281          BOOST_REQUIRE(kvds.exists(key));
00282          BOOST_REQUIRE(kvds.erase(key));
00283          BOOST_REQUIRE(!kvds.exists(key));
00284       }
00285 
00286       BOOST_REQUIRE(kvds.empty());
00287    }
00288 
00289    void test_empty(kvds_type & kvds, bool const empty = true)
00290    {
00291       BOOST_REQUIRE(empty == kvds.empty());
00292    }
00293 
00294    void test_clear_empty(kvds_type & kvds)
00295    {
00296       BOOST_REQUIRE(kvds.clear());
00297       BOOST_REQUIRE(kvds.empty());
00298    }
00299 
00300    void test_indexing(kvds_type & kvds)
00301    {
00302       for(uint32_t key = 1 ; key != 0 ; key <<= 1)
00303       {
00304          uint32_t const val = key ^ val0_mask ^ val1_mask;
00305 
00306          BOOST_REQUIRE(kvds[key] == uint32_t());
00307 
00308          kvds[key] = val;
00309 
00310          BOOST_REQUIRE(kvds[key] == val);
00311       }
00312    }
00313 
00314 public:
00315 
00316    void operator()(kvds_type & kvds)
00317    {
00318       // Each test has a dependency on the previous so don't change the ordering.
00319       test_empty(kvds);
00320       test_size(kvds, 0, false);
00321       test_get_noexist(kvds);
00322       test_add_cnt_get(kvds);
00323       test_empty(kvds, false);
00324       test_put_cnt_get(kvds, false);
00325       test_empty(kvds, false);
00326       test_clear_empty(kvds);
00327       test_put_cnt_get(kvds);
00328       test_empty(kvds, false);
00329       test_size(kvds, 1);
00330       test_add_get(kvds);
00331       test_empty(kvds, false);
00332       test_size(kvds, 2);
00333       test_get_all(kvds);
00334       test_get_few(kvds);
00335       test_exist_erase(kvds);
00336       test_put_get(kvds);
00337       test_exist_erase(kvds);
00338       test_indexing(kvds);
00339    }
00340 };
00341 
00342 namespace {
00343    typedef Kvds<uint32_t, uint32_t> kvds_test_t;
00344 }
00345 
00346 BOOST_FIXTURE_TEST_CASE( test_kvds_bbt, Fixture )
00347 {
00348    shared_ptr<KvdsBbt> spKvdsBbt(new KvdsBbt);
00349    spKvdsBbt->open(tdc.GetFilePath("KvdsBbt").c_str());
00350    kvds_test_t kvds(spKvdsBbt);
00351    KvdsTester<kvds_test_t>()(kvds);
00352 }
00353 
00354 BOOST_FIXTURE_TEST_CASE( test_kvds_bht, Fixture )
00355 {
00356    shared_ptr<KvdsBht> spKvdsBht(new KvdsBht);
00357    spKvdsBht->open(tdc.GetFilePath("KvdsBht").c_str());
00358    kvds_test_t kvds(spKvdsBht);
00359    KvdsTester<kvds_test_t>()(kvds);
00360 }
00361 
00362 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_nonintrinsic_key, Fixture )
00363 {
00364    shared_ptr<KvdsPageStore<KvdsPageMapNonIntrinsicKey<> > >
00365       spKvdsPageStore(new KvdsPageStore<KvdsPageMapNonIntrinsicKey<> >);
00366    spKvdsPageStore->open(tdc.GetFilePath("KvdsPageStore").c_str());
00367    kvds_test_t kvds(spKvdsPageStore);
00368    KvdsTester<kvds_test_t>()(kvds);
00369 }
00370 
00371 
00372 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_intrinsic_key, Fixture )
00373 {
00374    shared_ptr<KvdsPageStore<KvdsPageMapIntrinsicKey<uint32_t> > >
00375       spKvdsPageStore(new KvdsPageStore<KvdsPageMapIntrinsicKey<uint32_t> >);
00376    spKvdsPageStore->open(tdc.GetFilePath("KvdsPageStore").c_str());
00377    kvds_test_t kvds(spKvdsPageStore);
00378    KvdsTester<kvds_test_t>()(kvds);
00379 }
00380 
00381 
00382 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_shared_nonintrinsic_key, Fixture )
00383 {
00384    shared_ptr<KvdsPageStore<KvdsPageMapShared<KvdsPageMapNonIntrinsicKey<> > > >
00385       spKvdsPageStore(new KvdsPageStore<KvdsPageMapShared<KvdsPageMapNonIntrinsicKey<> > >);
00386    spKvdsPageStore->open(tdc.GetFilePath("KvdsPageStore").c_str());
00387    kvds_test_t kvds(spKvdsPageStore);
00388    KvdsTester<kvds_test_t>()(kvds);
00389 }
00390 
00391 
00392 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_shared_intrinsic_key, Fixture )
00393 {
00394    shared_ptr<KvdsPageStore<KvdsPageMapShared<KvdsPageMapIntrinsicKey<uint32_t> > > >
00395       spKvdsPageStore(new KvdsPageStore<KvdsPageMapShared<KvdsPageMapIntrinsicKey<uint32_t> > >);
00396    spKvdsPageStore->open(tdc.GetFilePath("KvdsPageStore").c_str());
00397    kvds_test_t kvds(spKvdsPageStore);
00398    KvdsTester<kvds_test_t>()(kvds);
00399 }
00400 
00401 
00402 BOOST_FIXTURE_TEST_CASE( test_kvds_tch, Fixture )
00403 {
00404    shared_ptr<KvdsTch> spKvdsTch(new KvdsTch);
00405    spKvdsTch->open(tdc.GetFilePath("KvdsTch").c_str());
00406    kvds_test_t kvds(spKvdsTch);
00407    KvdsTester<kvds_test_t>()(kvds);
00408 }
00409 
00410 BOOST_FIXTURE_TEST_CASE( test_kvds_kch, Fixture )
00411 {
00412    shared_ptr<KvdsKch> spKvdsKch(new KvdsKch);
00413    spKvdsKch->open(tdc.GetFilePath("KvdsKch").c_str());
00414    kvds_test_t kvds(spKvdsKch);
00415    KvdsTester<kvds_test_t>()(kvds);
00416 }
00417 
00418 BOOST_FIXTURE_TEST_CASE( test_kvds_mem_map, Fixture )
00419 {
00420    kvds_test_t kvds(ikvds_ptr_t(new KvdsMemMap));
00421    KvdsTester<kvds_test_t>()(kvds);
00422 }
00423 
00424 
00425 template<typename kvdsT>
00426 void TestSaveLoad(kvdsT & kvds, std::string const & sPath, bool saveTest, unsigned int const maxcnt)
00427 {
00428    // Now try and open a new datastore -- this should NOT fail
00429    kvds.open(sPath.c_str(), true);
00430 
00431    for(unsigned int key = 0 ; key < maxcnt ; ++key)
00432    {
00433       for(unsigned int val = 0 ; val < maxcnt ; ++val)
00434       {
00435          kvds.add(&key, sizeof(key), &val, sizeof(val));
00436       }
00437    }
00438 
00439    if(saveTest)
00440    {
00441       kvds.save();
00442    }
00443    else
00444    {
00445       // Now close the store
00446       kvds.close();
00447 
00448       // Finally, reopen and check keys and values are still all present and correct
00449       kvds.open(sPath.c_str());
00450    }
00451 
00452    uint64_t cnt = 0;
00453    BOOST_REQUIRE(kvds.cnt(cnt));
00454    BOOST_REQUIRE(maxcnt == cnt);
00455 
00456    for(unsigned int key = 0 ; key < maxcnt ; ++key)
00457    {
00458       size_t vals_size = 0;
00459       BOOST_REQUIRE(kvds.siz(&key, sizeof(key), vals_size));
00460       BOOST_REQUIRE(sizeof(unsigned int) * maxcnt == vals_size);
00461 
00462       std::vector<unsigned int> vals(maxcnt);
00463       kvds.all(&key, sizeof(key), &vals[0], vals_size);
00464       BOOST_REQUIRE(sizeof(unsigned int) * maxcnt == vals_size);
00465 
00466       for(unsigned int val = 0 ; val < maxcnt ; ++val)
00467       {
00468          BOOST_REQUIRE(vals[val] == val);
00469       }
00470    }
00471 
00472    kvds.close();
00473 }
00474 template<typename kvdsT>
00475 void TestSaveLoad(std::string const & sPath, bool saveTest)
00476 {
00477    for(unsigned int cnt = 0 ; cnt < 10 ; cnt+=3)
00478    {
00479       kvdsT kvds;
00480       TestSaveLoad(kvds, sPath, saveTest, cnt);
00481    }
00482 }
00483 
00484 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00485 // BDB - B-Tree
00486 BOOST_FIXTURE_TEST_CASE( test_kvds_bbt_save, Fixture )
00487 {
00488    TestSaveLoad<KvdsBbt>(tdc.GetFilePath("KvdsBbt"), true);
00489 }
00490 
00491 BOOST_FIXTURE_TEST_CASE( test_kvds_bbt_close_load, Fixture )
00492 {
00493    TestSaveLoad<KvdsBbt>(tdc.GetFilePath("KvdsBbt"), false);
00494 }
00495 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00496 // BDB - hash table
00497 BOOST_FIXTURE_TEST_CASE( test_kvds_bht_save, Fixture )
00498 {
00499    TestSaveLoad<KvdsBht>(tdc.GetFilePath("KvdsBht"), true);
00500 }
00501 
00502 BOOST_FIXTURE_TEST_CASE( test_kvds_bht_close_load, Fixture )
00503 {
00504    TestSaveLoad<KvdsBht>(tdc.GetFilePath("KvdsBht"), false);
00505 }
00506 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00507 // Page store -- intrinsic pagemap
00508 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_save_intrinsic_pagemap, Fixture )
00509 {
00510    TestSaveLoad<KvdsPageStore<KvdsPageMapIntrinsicKey<uint32_t> > >(tdc.GetFilePath("KvdsPageStore"), true);
00511 }
00512 
00513 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_close_load_intrinsic_pagemap, Fixture )
00514 {
00515    TestSaveLoad<KvdsPageStore<KvdsPageMapIntrinsicKey<uint32_t> > >(tdc.GetFilePath("KvdsPageStore"), false);
00516 }
00517 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00518 // Page store -- non-intrinsic pagemap
00519 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_save_nonintrinsic_pagemap, Fixture )
00520 {
00521    TestSaveLoad< KvdsPageStore<KvdsPageMapNonIntrinsicKey<> > >(tdc.GetFilePath("KvdsPageStore"), true);
00522 }
00523 
00524 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_close_load_nonintrinsic_pagemap, Fixture )
00525 {
00526    TestSaveLoad< KvdsPageStore<KvdsPageMapNonIntrinsicKey<> > >(tdc.GetFilePath("KvdsPageStore"), false);
00527 }
00528 
00529 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00530 // Page store -- intrinsic shared pagemap
00531 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_save_intrinsic_shared_pagemap, Fixture )
00532 {
00533    TestSaveLoad<KvdsPageStore<KvdsPageMapShared<KvdsPageMapIntrinsicKey<uint32_t> > > >(tdc.GetFilePath("KvdsPageStore"), true);
00534 }
00535 
00536 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_close_load_intrinsic_shared_pagemap, Fixture )
00537 {
00538    TestSaveLoad<KvdsPageStore<KvdsPageMapShared<KvdsPageMapIntrinsicKey<uint32_t> > > >(tdc.GetFilePath("KvdsPageStore"), false);
00539 }
00540 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00541 // Page store -- non-intrinsic shared pagemap
00542 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_save_nonintrinsic_shared_pagemap, Fixture )
00543 {
00544    TestSaveLoad<KvdsPageStore<KvdsPageMapShared<KvdsPageMapNonIntrinsicKey<> > > >(tdc.GetFilePath("KvdsPageStore"), true);
00545 }
00546 
00547 BOOST_FIXTURE_TEST_CASE( test_kvds_page_store_close_load_nonintrinsic_shared_pagemap, Fixture )
00548 {
00549    TestSaveLoad<KvdsPageStore<KvdsPageMapShared<KvdsPageMapNonIntrinsicKey<> > > >(tdc.GetFilePath("KvdsPageStore"), false);
00550 }
00551 
00552 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00553 // TCH
00554 BOOST_FIXTURE_TEST_CASE( test_kvds_tch_save, Fixture )
00555 {
00556    TestSaveLoad<KvdsTch>(tdc.GetFilePath("KvdsTch"), true);
00557 }
00558 
00559 BOOST_FIXTURE_TEST_CASE( test_kvds_tch_close_load, Fixture )
00560 {
00561    TestSaveLoad<KvdsTch>(tdc.GetFilePath("KvdsTch"), false);
00562 }
00563 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00564 // KCH
00565 BOOST_FIXTURE_TEST_CASE( test_kvds_kch_save, Fixture )
00566 {
00567    TestSaveLoad<KvdsKch>(tdc.GetFilePath("KvdsKch"), true);
00568 }
00569 
00570 BOOST_FIXTURE_TEST_CASE( test_kvds_kch_close_load, Fixture )
00571 {
00572    TestSaveLoad<KvdsKch>(tdc.GetFilePath("KvdsKch"), false);
00573 }
00574 
00575 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00576 // Mem map
00577 BOOST_FIXTURE_TEST_CASE( test_kvds_mem_map_save, Fixture )
00578 {
00579    TestSaveLoad<KvdsMemMap>(tdc.GetFilePath("KvdsMemMap"), true);
00580 }
00581 
00582 BOOST_FIXTURE_TEST_CASE( test_kvds_mem_map_close_load, Fixture )
00583 {
00584    TestSaveLoad<KvdsMemMap>(tdc.GetFilePath("KvdsMemMap"), false);
00585 }
00586 
00587 // Define end of test suite
00588 BOOST_AUTO_TEST_SUITE_END()