From f2c4da9d6121bb330c9fff640aad40e98c081190 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Tue, 14 Feb 2023 20:18:22 +0100 Subject: [PATCH] tests/gpu_tests: use MEMEQ for pl_planar_tests Mostly just to dump the array on failure. --- src/tests/gpu_tests.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tests/gpu_tests.h b/src/tests/gpu_tests.h index a4b23f4f..8bcd6fe7 100644 --- a/src/tests/gpu_tests.h +++ b/src/tests/gpu_tests.h @@ -299,8 +299,9 @@ static void pl_planar_tests(pl_gpu gpu) .ptr = data, ))); - for (int i = 0; i < PL_ARRAY_SIZE(data); i++) - REQUIRE_CMP(data[i], ==, 0x80, PRIu8); + uint8_t ref[PL_ARRAY_SIZE(data)]; + memset(ref, 0x80, sizeof(ref)); + REQUIRE_MEMEQ(data, ref, PL_ARRAY_SIZE(data)); pl_tex_destroy(gpu, &tex); }