summaryrefslogtreecommitdiff
path: root/tests/core
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-02-28 11:31:10 -0500
committerEdward Thomson <ethomson@github.com>2016-02-28 11:31:10 -0500
commit6cc4bac894281d3e80e1861c1ccb0e234cbd9bb0 (patch)
tree117e48da65c13ac7b89454f34417951d714ea33d /tests/core
parent9f4e7c84904030ecc7d14637fa8c51bac087fedf (diff)
parent93e16642280ab637f8688b8c2146b11f95f98325 (diff)
downloadlibgit2-6cc4bac894281d3e80e1861c1ccb0e234cbd9bb0.tar.gz
Merge pull request #3577 from rossdylan/rossdylan/pooldebug
Add a new build flag to disable the pool allocator
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);
}