Skip to content
Snippets Groups Projects
Commit acdd9091 authored by Nate Brune's avatar Nate Brune
Browse files

Added more tests

parent d26c22aa
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ if( APPLE )
else( APPLE )
# Linux Specific Options Here
message( STATUS "Configuring ChainBase on Linux" )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -Wall" )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -pthread -std=c++11 -Wall" )
set( rt_library rt )
set( pthread_library pthread)
if ( FULL_STATIC_BUILD )
......
......@@ -130,10 +130,30 @@ BOOST_AUTO_TEST_CASE( open_and_create ) {
BOOST_REQUIRE_EQUAL( new_book.a, copy_new_book.a );
BOOST_REQUIRE_EQUAL( new_book.b, copy_new_book.b );
db.wipe( temp );
BOOST_REQUIRE( !bfs::exists( temp / "shared_memory.bin") );
} catch ( ... ) {
bfs::remove_all( temp );
throw;
}
}
BOOST_AUTO_TEST_CASE( lock_test ) {
boost::filesystem::path temp = boost::filesystem::unique_path();
try {
std::cerr << temp.native() << " \n";
BOOST_TEST_MESSAGE( "Creating Databases");
chainbase::database db, db2;
db.open( temp, database::read_write, 1024*1024*8 );
BOOST_CHECK_THROW(db2.open( temp, database::read_write ), bip::interprocess_exception)3221;
} catch ( ... ) {
bfs::remove_all ( temp );
throw;
}
}
// BOOST_AUTO_TEST_SUITE_END()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment