summaryrefslogtreecommitdiffhomepage
path: root/test/nxt_msec_diff_unit_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_msec_diff_unit_test.c
parent92f3b852981c739a2e6ff6d50dc646fe86031b27 (diff)
downloadunit-cdc7e4479ff5aa08df0857a13a7acd7a00b79c89.tar.gz
unit-cdc7e4479ff5aa08df0857a13a7acd7a00b79c89.tar.bz2
Lib unit tests have been renamed to tests.
Diffstat (limited to 'test/nxt_msec_diff_unit_test.c')
-rw-r--r--test/nxt_msec_diff_unit_test.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/test/nxt_msec_diff_unit_test.c b/test/nxt_msec_diff_unit_test.c
deleted file mode 100644
index 504cbb5a..00000000
--- a/test/nxt_msec_diff_unit_test.c
+++ /dev/null
@@ -1,45 +0,0 @@
-
-/*
- * Copyright (C) Igor Sysoev
- * Copyright (C) NGINX, Inc.
- */
-
-#include <nxt_main.h>
-
-
-static const nxt_msec_t pairs[] = {
-
- 0x00000000, 0x00000001,
- 0x00000000, 0x7fffffff,
-
- 0x7fffffff, 0x80000000,
- 0x7fffffff, 0x80000001,
-
- 0x80000000, 0x80000001,
- 0x80000000, 0xffffffff,
-
- 0xffffffff, 0x00000000,
- 0xffffffff, 0x00000001,
-};
-
-
-nxt_int_t
-nxt_msec_diff_unit_test(nxt_thread_t *thr, nxt_msec_less_t less)
-{
- nxt_uint_t i;
-
- nxt_thread_time_update(thr);
-
- for (i = 0; i < nxt_nitems(pairs); i += 2) {
-
- if (!less(pairs[i], pairs[i + 1])) {
- nxt_log_alert(thr->log,
- "msec diff unit test failed: 0x%08XM 0x%08XM",
- pairs[i], pairs[i + 1]);
- return NXT_ERROR;
- }
- }
-
- nxt_log_error(NXT_LOG_NOTICE, thr->log, "msec diff unit test passed");
- return NXT_OK;
-}