weston/tests
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
..
reference tests/color-icc-output: add ICC VCGT tests 2023-04-27 10:37:38 +00:00
visualization tests/alpha-blending: replace compare_float() with rgb_diff_stat 2022-06-30 09:08:32 +00:00
alpha-blending-test.c tests: Add the ability the specify the output name 2023-01-25 17:55:39 +00:00
assert-test.c shared: add weston-assert 2023-09-28 06:52:24 +00:00
bad-buffer-test.c tests: Use test-desktop-shell more widely 2022-11-04 10:24:42 +00:00
buffer-transforms-test.c tests: Add the ability the specify the output name 2023-01-25 17:55:39 +00:00
color_util.c tests/color-icc-output: add ICC VCGT tests 2023-04-27 10:37:38 +00:00
color_util.h tests/color-icc-output: add ICC VCGT tests 2023-04-27 10:37:38 +00:00
color-icc-output-test.c tests/color-icc-output: add ICC VCGT tests 2023-04-27 10:37:38 +00:00
color-lcms-optimizer-test.c tests: add color pipeline optimizer tests 2023-06-29 11:08:40 +00:00
color-manager-test.c tests: use enum weston_renderer_type 2023-01-18 14:16:41 +01:00
color-metadata-errors-test.c tests: prevent tests from breaking when they use invalid weston_compositor 2023-07-11 07:26:43 -05:00
color-metadata-parsing-test.c tests: use enum weston_renderer_type 2023-01-18 14:16:41 +01:00
config-parser-test.c tests: Use memstream for config-parser test 2022-07-05 10:15:49 +01:00
constraints-test.c tests: Add basic testing for pointer constraints protocol 2023-06-14 10:27:14 +03:00
custom-env-test.c custom-env: Add helper to parse combined env/arg strings 2022-07-19 14:12:37 +00:00
devices-test.c tests: Remove single case for device destroy test 2023-06-30 11:42:00 +00:00
drm-formats-test.c drm-formats: add weston_drm_format_array_count_pairs() 2021-11-25 10:47:45 -03:00
drm-smoke-test.c drm-smoke-test: Explicitly set-up the output name DRM test 2023-01-25 17:55:39 +00:00
drm-writeback-screenshot-test.c tests/drm: Fix leaks in drm-writeback-screenshot-test 2023-06-19 21:32:47 +01:00
event-test.c tests: Don't wait for frame callbacks when a surface is on no outputs 2023-06-28 11:30:07 -05:00
image-iter.h tests/color-icc-output: extract image-iter.h 2022-06-16 08:52:12 +00:00
input-timestamps-helper.c tests: replace fprintf() with testlog() 2019-11-22 12:54:10 +02:00
input-timestamps-helper.h tests: Introduce input timestamps helper 2018-02-20 10:20:29 +02:00
internal-screenshot-test.c tests: Add the ability the specify the output name 2023-01-25 17:55:39 +00:00
iterate-debug-scopes-test.c libweston/weston-log: Add a iterator helper for debug scope 2023-05-30 11:05:14 +00:00
ivi-layout-internal-test.c tests: ivi-shell: prepare for API simplification 2023-04-19 09:38:09 +03:00
ivi-layout-test-client.c tests: ivi-shell: prepare for API simplification 2023-04-19 09:38:09 +03:00
ivi-layout-test-plugin.c tests: ivi-shell: prepare for API simplification 2023-04-19 09:38:09 +03:00
ivi-shell-app-test.c tests: fix leak in ivi-shell-app-test 2021-06-16 14:41:08 +00:00
ivi-test.h ivi-shell: implement surface_on_many_layer test 2016-06-29 11:32:23 +03:00
keyboard-test.c tests: Use test-desktop-shell more widely 2022-11-04 10:24:42 +00:00
lcms_util.c tests/lcms_util: add SetTextTags() 2022-06-03 10:22:25 +00:00
lcms_util.h tests/lcms_util: add SetTextTags() 2022-06-03 10:22:25 +00:00
lcms-util-test.c tests: add lcms-util with MPE curves 2022-06-03 10:22:25 +00:00
linux-explicit-synchronization-test.c tests: use enum weston_renderer_type 2023-01-18 14:16:41 +01:00
matrix-test.c tests: add matrix-test for CI 2022-05-31 12:26:09 +00:00
matrix-transform-test.c libweston: Use weston_coord in struct weston_output 2023-06-12 16:55:22 -05:00
meson.build shared: add weston-assert 2023-09-28 06:52:24 +00:00
output-capture-protocol-test.c tests: use enum weston_renderer_type 2023-01-18 14:16:41 +01:00
output-damage-test.c tests: Add the ability the specify the output name 2023-01-25 17:55:39 +00:00
output-decorations-test.c tests: use enum weston_renderer_type 2023-01-18 14:16:41 +01:00
output-transforms-test.c tests: Add the ability the specify the output name 2023-01-25 17:55:39 +00:00
paint-node-test.c tests: Check that test-surface unmaps on NULL 2023-07-11 15:27:28 +00:00
plugin-registry-test.c tests: Use test-desktop-shell more widely 2022-11-04 10:24:42 +00:00
pointer-shot-test.c tests: Add the ability the specify the output name 2023-01-25 17:55:39 +00:00
pointer-test.c tests: Use test-desktop-shell more widely 2022-11-04 10:24:42 +00:00
presentation-test.c tests: Use test-desktop-shell more widely 2022-11-04 10:24:42 +00:00
roles-test.c tests: Use test-desktop-shell more widely 2022-11-04 10:24:42 +00:00
safe-signal-output-removal-test.c shell-utils: Use weston_coord in curtain params 2023-09-18 20:35:37 +00:00
safe-signal-test.c safe-signal-test: Fix leak 2022-06-29 14:33:21 +01:00
setbacklight.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:19 -07:00
single-pixel-buffer-test.c tests: Add the ability the specify the output name 2023-01-25 17:55:39 +00:00
string-test.c tests: add missing include 2017-01-23 14:12:06 +02:00
subsurface-shot-test.c surface: Add test for recursive subsurface unmapping 2023-07-04 15:52:21 +01:00
subsurface-test.c tests: Use test-desktop-shell more widely 2022-11-04 10:24:42 +00:00
surface-global-test.c libweston: use weston_coord for weston_view_set_position 2023-06-12 16:55:19 -05:00
surface-screenshot-test.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
surface-test.c libweston: use weston_coord for weston_view_set_position 2023-06-12 16:55:19 -05:00
text-test.c tests: Explicitly use desktop-shell for text-test 2022-11-04 10:24:42 +00:00
timespec-test.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
touch-test.c tests: Don't send real coordinates with WL_TOUCH_UP events 2023-02-09 12:12:40 +00:00
vertex-clip-test.c gl-renderer: Store clipped vertices directly into the vertex buffer 2023-06-12 11:15:51 +00:00
viewporter-shot-test.c tests: Add the ability the specify the output name 2023-01-25 17:55:39 +00:00
viewporter-test.c tests: Use test-desktop-shell more widely 2022-11-04 10:24:42 +00:00
weston-test-client-helper.c tests: Add client<->compositor breakpoint support 2023-06-30 11:42:00 +00:00
weston-test-client-helper.h tests: Add client<->compositor breakpoint support 2023-06-30 11:42:00 +00:00
weston-test-desktop-shell.c shell-utils: Use weston_coord in curtain params 2023-09-18 20:35:37 +00:00
weston-test-fixture-compositor.c tests: Allow DRM fixture setup to cleanly skip 2023-04-12 10:52:57 +00:00
weston-test-fixture-compositor.h tests: use enum weston_renderer_type 2023-01-18 14:16:41 +01:00
weston-test-runner.c tests: Pass wet_testsuite_data to test runs 2023-06-30 11:42:00 +00:00
weston-test-runner.h tests: Add client<->compositor breakpoint support 2023-06-30 11:42:00 +00:00
weston-test.c tests: Don't remap surfaces with NULL buffer 2023-07-11 15:27:28 +00:00
weston-testsuite-data.h tests: Add client<->compositor breakpoint support 2023-06-30 11:42:00 +00:00
xcb-client-helper.c tests/xwayland: Enable xwayland XWM debug log scope and more debug 2023-03-28 12:45:13 +03:00
xcb-client-helper.h xcb-client-helper: Add a XCB client helper for tests 2023-03-03 08:30:46 +00:00
xwayland-test.c tests/xwayland: Ensure $DISPLAY is correctly set 2023-06-19 21:32:47 +01:00
yuv-buffer-test.c tests: Add the ability the specify the output name 2023-01-25 17:55:39 +00:00