destructs local objects on exit.
If a previous test case fails for any reason, the new assertion will fail
instead of store_dir.cc aborting. This may save us from tracking non-existent
StoreController initialization bugs.
if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
+ // This assertion may fail if previous test cases fail.
+ // Apparently, CPPUNIT_ASSERT* failure may prevent destructors of local
+ // objects such as "StorePointer aRoot" from being called.
+ CPPUNIT_ASSERT(!store_table); // or StoreHashIndex ctor will abort below
+
StorePointer aRoot (new StoreController);
Store::Root(aRoot);
SwapDirPointer aStore (new UFSSwapDir("ufs", "Blocking"));