diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-04-27 19:16:45 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-04-27 19:16:45 +0200 |
commit | 43034a36e132ac4394e26cbfb4d855bd6f5114b3 (patch) | |
tree | aee5502c6b17283b80ff2bf0706f97622df5d355 /memory/jemalloc/src/test/unit/ticker.c | |
parent | 077c63084488ac38c1c44e8cdaa9c33086f0a649 (diff) | |
download | UXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.tar UXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.tar.gz UXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.tar.lz UXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.tar.xz UXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.zip |
Remove jemalloc 4 from our tree.
Diffstat (limited to 'memory/jemalloc/src/test/unit/ticker.c')
-rw-r--r-- | memory/jemalloc/src/test/unit/ticker.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/memory/jemalloc/src/test/unit/ticker.c b/memory/jemalloc/src/test/unit/ticker.c deleted file mode 100644 index e737020ab..000000000 --- a/memory/jemalloc/src/test/unit/ticker.c +++ /dev/null @@ -1,76 +0,0 @@ -#include "test/jemalloc_test.h" - -TEST_BEGIN(test_ticker_tick) -{ -#define NREPS 2 -#define NTICKS 3 - ticker_t ticker; - int32_t i, j; - - ticker_init(&ticker, NTICKS); - for (i = 0; i < NREPS; i++) { - for (j = 0; j < NTICKS; j++) { - assert_u_eq(ticker_read(&ticker), NTICKS - j, - "Unexpected ticker value (i=%d, j=%d)", i, j); - assert_false(ticker_tick(&ticker), - "Unexpected ticker fire (i=%d, j=%d)", i, j); - } - assert_u32_eq(ticker_read(&ticker), 0, - "Expected ticker depletion"); - assert_true(ticker_tick(&ticker), - "Expected ticker fire (i=%d)", i); - assert_u32_eq(ticker_read(&ticker), NTICKS, - "Expected ticker reset"); - } -#undef NTICKS -} -TEST_END - -TEST_BEGIN(test_ticker_ticks) -{ -#define NTICKS 3 - ticker_t ticker; - - ticker_init(&ticker, NTICKS); - - assert_u_eq(ticker_read(&ticker), NTICKS, "Unexpected ticker value"); - assert_false(ticker_ticks(&ticker, NTICKS), "Unexpected ticker fire"); - assert_u_eq(ticker_read(&ticker), 0, "Unexpected ticker value"); - assert_true(ticker_ticks(&ticker, NTICKS), "Expected ticker fire"); - assert_u_eq(ticker_read(&ticker), NTICKS, "Unexpected ticker value"); - - assert_true(ticker_ticks(&ticker, NTICKS + 1), "Expected ticker fire"); - assert_u_eq(ticker_read(&ticker), NTICKS, "Unexpected ticker value"); -#undef NTICKS -} -TEST_END - -TEST_BEGIN(test_ticker_copy) -{ -#define NTICKS 3 - ticker_t ta, tb; - - ticker_init(&ta, NTICKS); - ticker_copy(&tb, &ta); - assert_u_eq(ticker_read(&tb), NTICKS, "Unexpected ticker value"); - assert_true(ticker_ticks(&tb, NTICKS + 1), "Expected ticker fire"); - assert_u_eq(ticker_read(&tb), NTICKS, "Unexpected ticker value"); - - ticker_tick(&ta); - ticker_copy(&tb, &ta); - assert_u_eq(ticker_read(&tb), NTICKS - 1, "Unexpected ticker value"); - assert_true(ticker_ticks(&tb, NTICKS), "Expected ticker fire"); - assert_u_eq(ticker_read(&tb), NTICKS, "Unexpected ticker value"); -#undef NTICKS -} -TEST_END - -int -main(void) -{ - - return (test( - test_ticker_tick, - test_ticker_ticks, - test_ticker_copy)); -} |