projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be5b5fb
)
util/tests: adjust for new gtest
author
David Heidelberg
<david.heidelberg@collabora.com>
Fri, 28 Apr 2023 10:51:59 +0000
(12:51 +0200)
committer
Marge Bot
<emma+marge@anholt.net>
Sun, 14 May 2023 11:09:01 +0000
(11:09 +0000)
GTest deprecated the GTEST_ARRAY_SIZE_ macro.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22814>
src/util/tests/u_qsort_test.cpp
patch
|
blob
|
history
diff --git
a/src/util/tests/u_qsort_test.cpp
b/src/util/tests/u_qsort_test.cpp
index
e6c3f0b
..
53ae683
100644
(file)
--- 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<void *>(&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);
}
}