Commit a1ad6ab0 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #479

Fixed some tests for tlogn range trees.

git-svn-id: file:///svn/tokudb@2708 c7de825b-a66e-492c-adef-691d508d4ae1
parent becb7c5b
......@@ -92,7 +92,7 @@ HEADERS=../rangetree.h ../rangetree-internal.h test.h
%.lin: %.c $(HEADERS) $(LINEAR_BINS)
cc -DDIR=\"dir.$<.lin\" $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINEAR_BINS)
%.tlog: %.c $(HEADERS) $(TLOG_BINS)
cc -DDIR=\"dir.$<.log\" $(CFLAGS) $(CPPFLAGS) $< -o $@ $(TLOG_BINS)
cc -DDIR=\"dir.$<.log\" $(CFLAGS) $(CPPFLAGS) $< -o $@ $(TLOG_BINS) -DTOKU_RT_NOOVERLAPS
%.log: %.c $(HEADERS) $(LOG_BINS)
cc -DDIR=\"dir.$<.log\" $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LOG_BINS)
......
......@@ -11,6 +11,9 @@ int main(int argc, const char *argv[]) {
parse_args(argc, argv);
for (allow_overlaps = 0; allow_overlaps < 2; allow_overlaps++) {
#ifdef TOKU_RT_NOOVERLAPS
if (allow_overlaps) continue;
#endif
r = toku_rt_create(&tree, int_cmp, char_cmp, allow_overlaps, malloc, free, realloc);
CKERR(r);
......@@ -26,6 +29,9 @@ int main(int argc, const char *argv[]) {
}
for (allow_overlaps = 0; allow_overlaps < 2; allow_overlaps++) {
#ifdef TOKU_RT_NOOVERLAPS
if (allow_overlaps) continue;
#endif
int i;
for (i = 1; i <= 2; i++) {
mallocced = 0;
......
......@@ -123,6 +123,7 @@ int main(int argc, const char *argv[]) {
r = toku_rt_close(tree); CKERR(r);
#ifndef TOKU_RT_NOOVERLAPS
r = toku_rt_create(&tree, int_cmp, ptr_cmp, TRUE, malloc, free, realloc);
CKERR(r);
assert(tree != NULL);
......@@ -131,6 +132,9 @@ int main(int argc, const char *argv[]) {
CKERR2(r, EINVAL);
r = toku_rt_close(tree); CKERR(r);
tree = NULL;
#endif
/* Successor tests */
......@@ -152,6 +156,7 @@ int main(int argc, const char *argv[]) {
r = toku_rt_close(tree); CKERR(r);
#ifndef TOKU_RT_NOOVERLAPS
r = toku_rt_create(&tree, int_cmp, ptr_cmp, TRUE, malloc, free, realloc);
CKERR(r);
assert(tree != NULL);
......@@ -162,7 +167,7 @@ int main(int argc, const char *argv[]) {
r = toku_rt_close(tree); CKERR(r);
tree = NULL;
#endif
/* Get allow overlap */
BOOL allowed;
......
......@@ -20,6 +20,7 @@ int main(int argc, const char *argv[]) {
|-------A-------|
|-------B-------|
*/
#ifndef TOKU_RT_NOOVERLAPS
r = toku_rt_create(&tree, int_cmp, char_cmp, TRUE, malloc, free, realloc);
CKERR(r);
......@@ -104,7 +105,7 @@ int main(int argc, const char *argv[]) {
r = toku_rt_close(tree); CKERR(r);
tree = NULL;
#endif
/* Test no overlap case. */
/*
1 2 3 4 5 6 7
......
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