summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_main.h7
-rw-r--r--src/nxt_random.c9
-rw-r--r--src/nxt_random.h4
3 files changed, 6 insertions, 14 deletions
diff --git a/src/nxt_main.h b/src/nxt_main.h
index a0be58a1..c7776c8b 100644
--- a/src/nxt_main.h
+++ b/src/nxt_main.h
@@ -161,13 +161,6 @@ typedef struct nxt_upstream_source_s nxt_upstream_source_t;
#include <nxt_port_hash.h>
-#if (NXT_LIB_UNIT_TEST)
-#include <../test/nxt_lib_unit_test.h>
-#else
-#define NXT_LIB_UNIT_TEST_STATIC static
-#endif
-
-
/*
* The envp argument must be &environ if application may
* change its process title with nxt_process_title().
diff --git a/src/nxt_random.c b/src/nxt_random.c
index ea73ae18..38b14e56 100644
--- a/src/nxt_random.c
+++ b/src/nxt_random.c
@@ -162,10 +162,10 @@ nxt_random_byte(nxt_random_t *r)
}
-#if (NXT_LIB_UNIT_TEST)
+#if (NXT_TESTS)
nxt_int_t
-nxt_random_unit_test(nxt_thread_t *thr)
+nxt_random_test(nxt_thread_t *thr)
{
nxt_uint_t n;
nxt_random_t r;
@@ -188,14 +188,13 @@ nxt_random_unit_test(nxt_thread_t *thr)
}
if (nxt_random(&r) == 0x6FCAE186) {
- nxt_log_error(NXT_LOG_NOTICE, thr->log,
- "arc4random unit test passed");
+ nxt_log_error(NXT_LOG_NOTICE, thr->log, "arc4random test passed");
return NXT_OK;
}
}
- nxt_log_error(NXT_LOG_NOTICE, thr->log, "arc4random unit test failed");
+ nxt_log_error(NXT_LOG_NOTICE, thr->log, "arc4random test failed");
return NXT_ERROR;
}
diff --git a/src/nxt_random.h b/src/nxt_random.h
index f9c07e54..962fdf8f 100644
--- a/src/nxt_random.h
+++ b/src/nxt_random.h
@@ -19,8 +19,8 @@ typedef struct {
void nxt_random_init(nxt_random_t *r);
uint32_t nxt_random(nxt_random_t *r);
-#if (NXT_LIB_UNIT_TEST)
-nxt_int_t nxt_random_unit_test(nxt_thread_t *thr);
+#if (NXT_TESTS)
+nxt_int_t nxt_random_test(nxt_thread_t *thr);
#endif