pan/bi: Test pack_literal

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
This commit is contained in:
Alyssa Rosenzweig 2020-12-29 10:56:08 -05:00 committed by Marge Bot
parent 80157fac68
commit e383af639a

View file

@ -942,8 +942,17 @@ bi_pack(bi_context *ctx, struct util_dynarray *emission)
#ifndef NDEBUG
static void
bi_test_pack_literal(void)
{
for (unsigned x = 0; x <= 7; ++x)
assert(bi_pack_literal(BI_CLAUSE_SUBWORD_LITERAL_0 + x) == x);
}
int bi_test_packing(void)
{
bi_test_pack_literal();
return 0;
}
#endif