summaryrefslogtreecommitdiffstats
path: root/test/unit/util.c
Commit message (Collapse)AuthorAgeFilesLines
* Disentangle assert and utilDavid Goldblatt2017-03-061-307/+0
| | | | | | | | | This is the first header refactoring diff, #533. It splits the assert and util components into separate, hermetic, header files. In the process, it splits out two of the large sub-components of util (the stdio.h replacement, and bit manipulation routines) into their own components (malloc_io.h and bit_util.h). This is mostly to break up cyclic dependencies, but it also breaks off a good chunk of the catch-all-ness of util, which is nice.
* Replace tabs following #define with spaces.Jason Evans2017-01-211-8/+8
| | | | This resolves #564.
* Remove extraneous parens around return arguments.Jason Evans2017-01-211-2/+2
| | | | This resolves #540.
* Update brace style.Jason Evans2017-01-211-16/+8
| | | | | | | Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
* Remove leading blank lines from function bodies.Jason Evans2017-01-131-4/+0
| | | | This resolves #535.
* Explicitly cast negative constants meant for use as unsigned.Jason Evans2016-10-281-3/+5
|
* Fix style nits.Jason Evans2016-04-171-2/+2
|
* Fix more 64-to-32 conversion warnings.Jason Evans2016-04-121-6/+6
|
* Refactor out signed/unsigned comparisons.Jason Evans2016-03-151-4/+4
|
* Refactor prng* from cpp macros into inline functions.Jason Evans2016-02-201-23/+46
| | | | | Remove 32-bit variant, convert prng64() to prng_lg_range(), and add prng_range().
* Use KQU() rather than QU() where applicable.Jason Evans2014-05-291-45/+45
| | | | Fix KZI() and KQI() to append LL rather than ULL.
* Use C99 varadic macros instead of GCC onesMike Hommey2014-05-271-4/+4
|
* Test and fix malloc_printf("%%").Jason Evans2014-01-221-0/+2
|
* Fix warnings and a test failure exposed on CentOS 6.3.Jason Evans2014-01-151-2/+0
|
* Add util unit tests, and fix discovered bugs.Jason Evans2014-01-071-0/+294
Add unit tests for pow2_ceil(), malloc_strtoumax(), and malloc_snprintf(). Fix numerous bugs in malloc_strotumax() error handling/reporting. These bugs could have caused application-visible issues for some seldom used (0X... and 0... prefixes) or malformed MALLOC_CONF or mallctl() argument strings, but otherwise they had no impact. Fix numerous bugs in malloc_snprintf(). These bugs were not exercised by existing malloc_*printf() calls, so they had no impact.