d2b70d2fa9
Add yet another flavor of assertion macros. Unlike libc assert.h assert(), these cannot be easily disabled by the build. They also print both the implied expression and the compared values. Unlike ZUC macros, there is much less framework code and it can handle also floating-point types. The function custom_assert_fail_ can be redefined, meaning that different compilation units can do different things on failure. Also the 'compositor' parameter was added to the new macros because we plan to use these asserts in our log infrastructure, and we want to print the "failure" messages in the right log scopes. Having the compositor already in the macros will avoid double work. Another future possibility is to write specific asserts for the test suite. So we would be able to write a test suite failure function that just print what "failed" without aborting. There is also limited support for custom types. These are actually pretty similar to libinput's litest macros. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> |
||
---|---|---|
.. | ||
cairo-util.c | ||
cairo-util.h | ||
config-parser.c | ||
fd-util.h | ||
file-util.c | ||
file-util.h | ||
frame.c | ||
hash.c | ||
hash.h | ||
helpers.h | ||
image-loader.c | ||
image-loader.h | ||
matrix.c | ||
meson.build | ||
option-parser.c | ||
os-compatibility.c | ||
os-compatibility.h | ||
platform.h | ||
process-util.c | ||
process-util.h | ||
signal.c | ||
signal.h | ||
string-helpers.h | ||
timespec-util.h | ||
weston-assert.h | ||
weston-drm-fourcc.h | ||
weston-egl-ext.h | ||
xalloc.h | ||
xcb-xwayland.c | ||
xcb-xwayland.h |