Martí Bolívar
1edc84f526
sys/util.h: add UTIL_OR and UTIL_AND
...
These are short-circuiting utility helpers that can save typing
in situations where avoiding evaluation of the not-taken branch
skips invalid expressions.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-25 13:21:28 +01:00
Martí Bolívar
3c7a939743
tests: add util.h MACRO_MAP_CAT test
...
This wasn't tested when it was first added.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-25 13:21:28 +01:00
Kumar Gala
28a88fc638
sys/util.h: allow UTIL_LISTIFY to pass args to repeat macro
...
Change UTIL_LISTIFY to support passing arguments to the F macro.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-13 07:33:57 -06:00
Krzysztof Chruscinski
79519c4dbe
tests: unit: util: Add test for IF_ENABLED()
...
Added test for new macro.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-12-18 08:14:52 -05:00
Anas Nashif
2051ad1846
tests: convert util test to a unit test
...
Merge tests/misc/util with existing util unit test.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-30 07:09:42 -04:00
Anas Nashif
50d5e37b8a
tests: move util test to be unit tests
...
Move to a unit test, no need to build this for every platform we have.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-27 15:23:26 -04:00