From 14f557112fc041382ed44ccc6eb1a2bf417d45a0 Mon Sep 17 00:00:00 2001 From: "Bradley C. Kuszmaul" Date: Tue, 31 Jul 2007 21:59:33 +0000 Subject: [PATCH] Catch a test that happened to work git-svn-id: file:///svn/tokudb@75 c7de825b-a66e-492c-adef-691d508d4ae1 --- newbrt/pma-test.c | 8 +++++++- newbrt/pma.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/newbrt/pma-test.c b/newbrt/pma-test.c index 2b4ceba0e0a..7c9b70728d1 100644 --- a/newbrt/pma-test.c +++ b/newbrt/pma-test.c @@ -78,6 +78,7 @@ static void test_pma_find (void) { pma->N = N; for (i=0; ipairs[i].key=0; assert(pma_index_limit(pma)==N); + pma->compare_fun = default_compare_fun; r=pmainternal_find(pma, fill_dbt(&k, "hello", 5), 0); assert(r==0); @@ -111,16 +112,18 @@ static void test_pma_find (void) { void test_smooth_region_N (int N) { struct pair pairs[N]; char *strings[100]; - char string[100]; + char string[N]; int i; int len; if (N<10) len=1; else if (N<100) len=2; else len=8; + for (i=0; ipairs); - toku_free(pma); if (pma->skey) toku_free(pma->skey); if (pma->sval) toku_free(pma->sval); + toku_free(pma); *pmap=0; return 0; }