get unit-tests working with g++ 4.4
This commit is contained in:
parent
19c7144b3b
commit
a285fee757
@ -491,7 +491,7 @@ namespace persistent_data {
|
|||||||
block_address nr_blocks)
|
block_address nr_blocks)
|
||||||
{
|
{
|
||||||
using namespace sm_disk_detail;
|
using namespace sm_disk_detail;
|
||||||
typename persistent_space_map::ptr sm(
|
typename sm_disk_detail::sm_disk<MetadataBlockSize>::ptr sm(
|
||||||
new sm_disk<MetadataBlockSize>(tm));
|
new sm_disk<MetadataBlockSize>(tm));
|
||||||
sm->extend(nr_blocks);
|
sm->extend(nr_blocks);
|
||||||
return sm;
|
return sm;
|
||||||
|
@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE(different_block_sizes)
|
|||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(read_validator_works)
|
BOOST_AUTO_TEST_CASE(read_validator_works)
|
||||||
{
|
{
|
||||||
typename block_manager<4096>::block_manager::validator::ptr v(new zero_validator<4096>());
|
block_manager<4096>::block_manager::validator::ptr v(new zero_validator<4096>());
|
||||||
auto bm = create_bm(64);
|
auto bm = create_bm(64);
|
||||||
bm->write_lock_zero(0);
|
bm->write_lock_zero(0);
|
||||||
bm->read_lock(0, v);
|
bm->read_lock(0, v);
|
||||||
@ -110,7 +110,7 @@ BOOST_AUTO_TEST_CASE(read_validator_works)
|
|||||||
BOOST_AUTO_TEST_CASE(write_validator_works)
|
BOOST_AUTO_TEST_CASE(write_validator_works)
|
||||||
{
|
{
|
||||||
auto bm = create_bm(64);
|
auto bm = create_bm(64);
|
||||||
typename block_manager<4096>::block_manager::validator::ptr v(new zero_validator<4096>());
|
block_manager<4096>::block_manager::validator::ptr v(new zero_validator<4096>());
|
||||||
|
|
||||||
{
|
{
|
||||||
auto wr = bm->write_lock(0, v);
|
auto wr = bm->write_lock(0, v);
|
||||||
|
@ -24,7 +24,7 @@ namespace {
|
|||||||
|
|
||||||
btree<1, uint64_traits, 4096>::ptr
|
btree<1, uint64_traits, 4096>::ptr
|
||||||
create_btree() {
|
create_btree() {
|
||||||
typename uint64_traits::ref_counter rc;
|
uint64_traits::ref_counter rc;
|
||||||
|
|
||||||
return btree<1, uint64_traits, 4096>::ptr(
|
return btree<1, uint64_traits, 4096>::ptr(
|
||||||
new btree<1, uint64_traits, 4096>(
|
new btree<1, uint64_traits, 4096>(
|
||||||
@ -37,16 +37,19 @@ namespace {
|
|||||||
//
|
//
|
||||||
class constraint_visitor : public btree<1, uint64_traits, 4096>::visitor {
|
class constraint_visitor : public btree<1, uint64_traits, 4096>::visitor {
|
||||||
public:
|
public:
|
||||||
void visit_internal(unsigned level, btree_detail::node_ref<uint64_traits, 4096> const &n) {
|
bool visit_internal(unsigned level, bool is_root, btree_detail::node_ref<uint64_traits, 4096> const &n) {
|
||||||
check_duplicate_block(n.get_location());
|
check_duplicate_block(n.get_location());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void visit_internal_leaf(unsigned level, btree_detail::node_ref<uint64_traits, 4096> const &n) {
|
bool visit_internal_leaf(unsigned level, bool is_root, btree_detail::node_ref<uint64_traits, 4096> const &n) {
|
||||||
check_duplicate_block(n.get_location());
|
check_duplicate_block(n.get_location());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void visit_leaf(unsigned level, btree_detail::node_ref<uint64_traits, 4096> const &n) {
|
bool visit_leaf(unsigned level, bool is_root, btree_detail::node_ref<uint64_traits, 4096> const &n) {
|
||||||
check_duplicate_block(n.get_location());
|
check_duplicate_block(n.get_location());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -66,7 +69,7 @@ namespace {
|
|||||||
void check_constraints(btree<1, uint64_traits, 4096>::ptr tree) {
|
void check_constraints(btree<1, uint64_traits, 4096>::ptr tree) {
|
||||||
typedef btree<1, uint64_traits, 4096> tree_type;
|
typedef btree<1, uint64_traits, 4096> tree_type;
|
||||||
|
|
||||||
typename tree_type::visitor::ptr v(new constraint_visitor);
|
tree_type::visitor::ptr v(new constraint_visitor);
|
||||||
tree->visit(v);
|
tree->visit(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user