get unit-tests working with g++ 4.4

This commit is contained in:
Joe Thornber 2011-08-30 12:47:42 +01:00
parent 19c7144b3b
commit a285fee757
3 changed files with 11 additions and 8 deletions

View File

@ -491,7 +491,7 @@ namespace persistent_data {
block_address nr_blocks)
{
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));
sm->extend(nr_blocks);
return sm;

View File

@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE(different_block_sizes)
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);
bm->write_lock_zero(0);
bm->read_lock(0, v);
@ -110,7 +110,7 @@ BOOST_AUTO_TEST_CASE(read_validator_works)
BOOST_AUTO_TEST_CASE(write_validator_works)
{
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);

View File

@ -24,7 +24,7 @@ namespace {
btree<1, uint64_traits, 4096>::ptr
create_btree() {
typename uint64_traits::ref_counter rc;
uint64_traits::ref_counter rc;
return btree<1, uint64_traits, 4096>::ptr(
new btree<1, uint64_traits, 4096>(
@ -37,16 +37,19 @@ namespace {
//
class constraint_visitor : public btree<1, uint64_traits, 4096>::visitor {
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());
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());
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());
return true;
}
private:
@ -66,7 +69,7 @@ namespace {
void check_constraints(btree<1, uint64_traits, 4096>::ptr tree) {
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);
}
}