weston/shared
Pekka Paalanen d2b70d2fa9 shared: add weston-assert
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>
2023-09-28 06:52:24 +00:00
..
cairo-util.c cairo-util: Add missing HAVE_PANGO guard 2023-02-20 11:04:23 +00:00
cairo-util.h clients: Add support for tablet cursor motion to window frames in libtoytoolkit 2023-03-31 12:10:26 +00:00
config-parser.c doc/sphinx: Include weston-config and shell-utils in docs 2023-01-09 22:13:07 +00:00
fd-util.h libweston: Support zwp_surface_synchronization_v1.set_acquire_fence 2019-02-06 12:21:56 +00:00
file-util.c clients: Fix/resolved doxygen warnings 2019-06-25 14:05:54 +00:00
file-util.h file-util: allow specifying path separately in file_create_dated() 2018-02-09 15:16:07 +00:00
frame.c clients: Add support for tablet cursor motion to window frames in libtoytoolkit 2023-03-31 12:10:26 +00:00
hash.c shared: extract hash table implementation from xwayland 2023-03-03 08:08:46 +00:00
hash.h shared: extract hash table implementation from xwayland 2023-03-03 08:08:46 +00:00
helpers.h helpers: Add an integer division helper that rounds up 2023-09-15 09:44:44 +03:00
image-loader.c image-loader: Fix undefined left shift in premultiply_data 2019-10-16 16:06:06 -04:00
image-loader.h shared: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:18 -07:00
matrix.c matrix: Introduce weston_coord 2023-02-01 07:27:05 -06:00
meson.build libweston,shared/meson:build Add xkbcommon missing depends 2023-05-18 19:23:12 +03:00
option-parser.c option-parser: Make bools boolean 2019-11-28 19:24:13 +00:00
os-compatibility.c shared: introduce os_fd_clear_cloexec() 2022-07-12 08:30:22 +00:00
os-compatibility.h shared: introduce os_fd_clear_cloexec() 2022-07-12 08:30:22 +00:00
platform.h Fix indentation all through the project 2021-07-31 15:28:20 +00:00
process-util.c frontend: Add FDSTR_INIT macro 2023-04-19 08:28:21 +00:00
process-util.h frontend: Add FDSTR_INIT macro 2023-04-19 08:28:21 +00:00
signal.c libweston: Introduce a safer wayland signal emission 2021-12-14 17:55:06 +00:00
signal.h libweston: Introduce a safer wayland signal emission 2021-12-14 17:55:06 +00:00
string-helpers.h gl_renderer: print more GL ES feature flags 2022-05-18 14:18:53 +03:00
timespec-util.h helpers: Add a u64 from 2 u32 helper 2022-10-27 08:13:30 +00:00
weston-assert.h shared: add weston-assert 2023-09-28 06:52:24 +00:00
weston-drm-fourcc.h gl-renderer: add support for (a|x)bgr16161616 shm formats 2022-02-02 11:58:58 +00:00
weston-egl-ext.h gl-renderer: query DRM device given an EGLDisplay 2021-11-25 10:47:39 -03:00
xalloc.h compositor/shared: Suppress write(2) warnings 2022-09-23 11:32:19 +00:00
xcb-xwayland.c xwm: Add support for xwayland_shell_v1 2023-03-03 08:21:24 +00:00
xcb-xwayland.h xwm: Add support for xwayland_shell_v1 2023-03-03 08:21:24 +00:00