summaryrefslogtreecommitdiffhomepage
path: root/test/nxt_malloc_test.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-08-30 00:31:02 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-08-30 00:31:02 +0300
commitcdc7e4479ff5aa08df0857a13a7acd7a00b79c89 (patch)
treea57bf9251fc79d9ef7bd3d33b1d05f3813dc3d4a /test/nxt_malloc_test.c
parent92f3b852981c739a2e6ff6d50dc646fe86031b27 (diff)
downloadunit-cdc7e4479ff5aa08df0857a13a7acd7a00b79c89.tar.gz
unit-cdc7e4479ff5aa08df0857a13a7acd7a00b79c89.tar.bz2
Lib unit tests have been renamed to tests.
Diffstat (limited to '')
-rw-r--r--test/nxt_malloc_test.c (renamed from test/nxt_malloc_unit_test.c)11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/nxt_malloc_unit_test.c b/test/nxt_malloc_test.c
index f1f67593..daa609b1 100644
--- a/test/nxt_malloc_unit_test.c
+++ b/test/nxt_malloc_test.c
@@ -5,6 +5,7 @@
*/
#include <nxt_main.h>
+#include "nxt_tests.h"
#define TIMES 1000
@@ -18,7 +19,7 @@ typedef struct {
static nxt_malloc_size_t *
-nxt_malloc_test(nxt_thread_t *thr, nxt_malloc_size_t *last, size_t size,
+nxt_malloc_run_test(nxt_thread_t *thr, nxt_malloc_size_t *last, size_t size,
nxt_uint_t times)
{
size_t a, s, alignment;
@@ -81,7 +82,7 @@ nxt_malloc_test(nxt_thread_t *thr, nxt_malloc_size_t *last, size_t size,
nxt_int_t
-nxt_malloc_unit_test(nxt_thread_t *thr)
+nxt_malloc_test(nxt_thread_t *thr)
{
size_t size;
nxt_malloc_size_t *last, *s;
@@ -92,21 +93,21 @@ nxt_malloc_unit_test(nxt_thread_t *thr)
last = &sizes[0];
for (size = 1; size < 64; size++) {
- last = nxt_malloc_test(thr, last, size, TIMES);
+ last = nxt_malloc_run_test(thr, last, size, TIMES);
if (last == NULL) {
return NXT_ERROR;
}
}
for (size = 64; size < 16384; size += 8) {
- last = nxt_malloc_test(thr, last, size, TIMES / 4);
+ last = nxt_malloc_run_test(thr, last, size, TIMES / 4);
if (last == NULL) {
return NXT_ERROR;
}
}
for (size = 16384; size < 512 * 1024 + 129; size += 128) {
- last = nxt_malloc_test(thr, last, size, TIMES / 16);
+ last = nxt_malloc_run_test(thr, last, size, TIMES / 16);
if (last == NULL) {
return NXT_ERROR;
}