util/rmq: Fix test upper bound

Since range_minimum_query takes a half-open interval, we should be
testing with j == width

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39165>
This commit is contained in:
Mel Henning 2026-01-05 13:27:42 -05:00 committed by Marge Bot
parent 99cc0d4fdd
commit 2219f879f3

View file

@ -42,7 +42,7 @@ TEST(range_minimum_query_test, range_minimum_query_test)
range_minimum_query_table_preprocess(&table);
for (uint32_t i = 0; i < width; i++) {
for (uint32_t j = i + 1; j < width; j++) {
for (uint32_t j = i + 1; j <= width; j++) {
// printf("%i, %i\n", i, j);
EXPECT_EQ(range_minimum_query(&table, i, j),
rmq_naive(&table, i, j));