Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Delinger <rossdylan@csh.rit.edu>2016-01-13 00:08:38 +0300
committerRoss Delinger <rossdylan@csh.rit.edu>2016-01-13 00:08:38 +0300
commited0571f89577d77de6c042454f61f9c055230095 (patch)
treeaaa7485178cc45f3ab7dd18252d2afc520e7a1ed /tests/core
parent700f0aff24d9b292f24d802c3af3b5c1705193c5 (diff)
Add a new build flag to disable the pool allocator and pass all git_pool_malloc calls straight to git__malloc
Diffstat (limited to 'tests/core')
-rw-r--r--tests/core/pool.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/core/pool.c b/tests/core/pool.c
index c43c1db67..b07da0abd 100644
--- a/tests/core/pool.c
+++ b/tests/core/pool.c
@@ -31,8 +31,10 @@ void test_core_pool__1(void)
for (i = 2010; i > 0; i--)
cl_assert(git_pool_malloc(&p, i) != NULL);
+#ifndef GIT_DEBUG_POOL
/* with fixed page size, allocation must end up with these values */
cl_assert_equal_i(591, git_pool__open_pages(&p));
+#endif
git_pool_clear(&p);
git_pool_init(&p, 1);
@@ -41,8 +43,10 @@ void test_core_pool__1(void)
for (i = 2010; i > 0; i--)
cl_assert(git_pool_malloc(&p, i) != NULL);
+#ifndef GIT_DEBUG_POOL
/* with fixed page size, allocation must end up with these values */
cl_assert_equal_i(sizeof(void *) == 8 ? 575 : 573, git_pool__open_pages(&p));
+#endif
git_pool_clear(&p);
}
@@ -69,8 +73,10 @@ void test_core_pool__2(void)
cl_git_pass(git_oid_fromstr(oid, oid_hex));
}
+#ifndef GIT_DEBUG_POOL
/* with fixed page size, allocation must end up with these values */
cl_assert_equal_i(sizeof(void *) == 8 ? 55 : 45, git_pool__open_pages(&p));
+#endif
git_pool_clear(&p);
}