panfrost: Fix incorrect test condition

Oh, the irony. I linked to this file in a software design class as an
example of how unit testing works under the hood, since it's not using
any particular testing framework. In doing so I realized the test is
totally broken. It doesn't matter -- the tests passed before, pass now,
and the code being tested is correct. But let's still fix the
embarassing logic error for future Panfrost hackers.

Fixes: d42e53c77a ("panfrost: Unit test clear colour packing")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13006>
This commit is contained in:
Alyssa Rosenzweig 2021-09-23 16:53:47 -04:00 committed by Marge Bot
parent 8cf37fc8a8
commit f100551bee

View file

@ -139,7 +139,7 @@ static const struct test clear_tests[] = {
};
#define ASSERT_EQ(x, y) do { \
if ((x[0] == y[0]) || (x[1] == y[1]) || (x[2] == y[2]) || (x[3] == y[3])) { \
if ((x[0] == y[0]) && (x[1] == y[1]) && (x[2] == y[2]) && (x[3] == y[3])) { \
nr_pass++; \
} else { \
nr_fail++; \