zephyr/tests/unit
Trond Einar Snekvik ed1f75da74 sys: util: Add clamp macro
Adds CLAMP macro to complement the current min/max macros, as well as a
gcc specific Z_CLAMP macro for single-evaluation expansion.

CLAMP combines the functionality of MIN and MAX, eliminating the
bug-prone usage of MIN(MAX(value, FLOOR), CEIL) found throughout the
codebase in every possible combination.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-11-05 12:12:17 +01:00
..
base64 cmake: make find_package(ZephyrUnittest...) REQUIRED 2020-06-12 11:10:23 +02:00
crc cmake: make find_package(ZephyrUnittest...) REQUIRED 2020-06-12 11:10:23 +02:00
intmath cmake: make find_package(ZephyrUnittest...) REQUIRED 2020-06-12 11:10:23 +02:00
list Revert "tests: dlist to add a testcase and add some tags" 2020-07-02 14:40:20 -05:00
math_extras cmake: make find_package(ZephyrUnittest...) REQUIRED 2020-06-12 11:10:23 +02:00
rbtree Revert "tests: rbtree to add and modify some tastcases" 2020-07-02 14:40:20 -05:00
timeutil cmake: make find_package(ZephyrUnittest...) REQUIRED 2020-06-12 11:10:23 +02:00
util sys: util: Add clamp macro 2020-11-05 12:12:17 +01:00