diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:52:54 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:52:54 +0100 |
| commit | dcacc00e3750300617ba6e16eb346713f91a783a (patch) | |
| tree | 38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/redis-unstable/deps/jemalloc/test/unit/div.c | |
| parent | 58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff) | |
| download | crep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz | |
Remove testing data
Diffstat (limited to 'examples/redis-unstable/deps/jemalloc/test/unit/div.c')
| -rw-r--r-- | examples/redis-unstable/deps/jemalloc/test/unit/div.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/examples/redis-unstable/deps/jemalloc/test/unit/div.c b/examples/redis-unstable/deps/jemalloc/test/unit/div.c deleted file mode 100644 index 29aea66..0000000 --- a/examples/redis-unstable/deps/jemalloc/test/unit/div.c +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | #include "test/jemalloc_test.h" | ||
| 2 | |||
| 3 | #include "jemalloc/internal/div.h" | ||
| 4 | |||
| 5 | TEST_BEGIN(test_div_exhaustive) { | ||
| 6 | for (size_t divisor = 2; divisor < 1000 * 1000; ++divisor) { | ||
| 7 | div_info_t div_info; | ||
| 8 | div_init(&div_info, divisor); | ||
| 9 | size_t max = 1000 * divisor; | ||
| 10 | if (max < 1000 * 1000) { | ||
| 11 | max = 1000 * 1000; | ||
| 12 | } | ||
| 13 | for (size_t dividend = 0; dividend < 1000 * divisor; | ||
| 14 | dividend += divisor) { | ||
| 15 | size_t quotient = div_compute( | ||
| 16 | &div_info, dividend); | ||
| 17 | expect_zu_eq(dividend, quotient * divisor, | ||
| 18 | "With divisor = %zu, dividend = %zu, " | ||
| 19 | "got quotient %zu", divisor, dividend, quotient); | ||
| 20 | } | ||
| 21 | } | ||
| 22 | } | ||
| 23 | TEST_END | ||
| 24 | |||
| 25 | int | ||
| 26 | main(void) { | ||
| 27 | return test_no_reentrancy( | ||
| 28 | test_div_exhaustive); | ||
| 29 | } | ||
