fix to match new api
authorvictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Fri, 13 Nov 2009 10:42:35 +0000 (10:42 +0000)
committervictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Fri, 13 Nov 2009 10:42:35 +0000 (10:42 +0000)
git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@548 e16421f0-f15b-0410-abcd-98678b794739

tests/freemap.cpp

index f368d12..297cb07 100755 (executable)
@@ -44,7 +44,9 @@ TEST(FreemapTest,Freemap) {
     for (int t=0; t<1000000; t++) {
         if (t<500000 || t>504000) {
             uint8_t lr = rand_norm(28);
-            bin64_t alloc = space.find(top,lr);
+            bin64_t alloc = space.find(top);
+            while (alloc.layer()>lr)
+                alloc = alloc.left();
             ASSERT_NE(0ULL,~alloc);
             EXPECT_EQ(bins::EMPTY, space.get(alloc));
             space.set(alloc,bins::FILLED);