Commit 8f03e752 authored by Alexander Baumstark's avatar Alexander Baumstark

Fix build

parent cf453971
Pipeline #410 failed with stages
in 2 minutes and 4 seconds
#include "catch.hpp"
#include "config.h"
#define UNIT_TESTS 1
#include <libpmemobj++/utils.hpp>
#include <libpmemobj++/make_persistent.hpp>
#include <libpmemobj++/experimental/array.hpp>
#include <libpmemobj++/p.hpp>
#include <libpmemobj++/persistent_ptr.hpp>
#include <libpmemobj++/transaction.hpp>
namespace pmemobj_exp = pmem::obj::experimental;
using pmem::obj::delete_persistent;
using pmem::obj::make_persistent;
using pmem::obj::p;
using pmem::obj::persistent_ptr;
using pmem::obj::transaction;
#include "woPSkiplist.hpp"
using pmem::obj::delete_persistent_atomic;
......@@ -10,7 +24,7 @@ TEST_CASE("Insert and lookup key") {
using woPSkip = woPSkiplist<int, int, 8, 8>;
struct root {
pptr<woPSkip> skiplist;
persistent_ptr<woPSkip> skiplist;
};
pool<root> pop;
......@@ -25,11 +39,9 @@ TEST_CASE("Insert and lookup key") {
auto q = pop.root();
auto &rootRef = *q;
const auto alloc_class = pop.ctl_set<struct pobj_alloc_class_desc>("heap.alloc_class.128.desc",
PBPTreeType4::AllocClass);
if(!rootRef.skiplist)
transaction::run(pop, [&] {rootRef.skiplist = make_persistent<woPSkip>(alloc_class); });
transaction::run(pop, [&] {rootRef.skiplist = make_persistent<woPSkip>(); });
SECTION("Inserting keys") {
auto &sl = *rootRef.skiplist;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment