From b289a9e16f25815e845506afbe8d429cdd3e9b4a Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Fri, 28 Apr 2023 12:51:59 +0200 Subject: [PATCH] util/tests: adjust for new gtest GTest deprecated the GTEST_ARRAY_SIZE_ macro. Signed-off-by: David Heidelberg Part-of: --- src/util/tests/u_qsort_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/tests/u_qsort_test.cpp b/src/util/tests/u_qsort_test.cpp index e6c3f0b..53ae683 100644 --- a/src/util/tests/u_qsort_test.cpp +++ b/src/util/tests/u_qsort_test.cpp @@ -43,11 +43,11 @@ TEST(u_qsort_test, qsort_test) int data[] = { 3, 6, 4, 9, 10, 2, 5, 7, 8, 1 }; int ctx = CONTEXT_CHECK; - util_qsort_r(data, GTEST_ARRAY_SIZE_(data), + util_qsort_r(data, sizeof(data) / sizeof(data[0]), sizeof(data[0]), cmp_func, reinterpret_cast(&ctx)); - for (size_t i = 0; i < GTEST_ARRAY_SIZE_(data); ++i) { + for (size_t i = 0; i < sizeof(data) / sizeof(data[0]); ++i) { EXPECT_EQ(data[i], i + 1); } } -- 2.7.4