Commit 6dcda6aa authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#3966 fix the a broken assert in the test_block_allocator_merge test refs[t:3966]

git-svn-id: file:///svn/toku/tokudb@35686 c7de825b-a66e-492c-adef-691d508d4ae1
parent 86bb9be1
...@@ -111,12 +111,14 @@ test_big_merge (void) { ...@@ -111,12 +111,14 @@ test_big_merge (void) {
u_int64_t an = twoG; u_int64_t an = twoG;
u_int64_t bn = 1; u_int64_t bn = 1;
struct block_allocator_blockpair *MALLOC_N(an+bn, a); struct block_allocator_blockpair *MALLOC_N(an+bn, a);
assert(a);
struct block_allocator_blockpair *MALLOC_N(bn, b); struct block_allocator_blockpair *MALLOC_N(bn, b);
assert(b);
for (u_int64_t i=0; i<an; i++) a[i].offset=i+1; for (u_int64_t i=0; i<an; i++) a[i].offset=i+1;
b[0].offset = 0; b[0].offset = 0;
block_allocator_merge_blockpairs_into(an, a, bn, b); block_allocator_merge_blockpairs_into(an, a, bn, b);
for (u_int64_t i=0; i<an+bn; i++) assert(a[i].offset=i); for (u_int64_t i=0; i<an+bn; i++) assert(a[i].offset == i);
toku_free(a); toku_free(a);
toku_free(b); toku_free(b);
} }
......
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