1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00

Tests: Print full 32-byte range of values in TestScanf

We are trying to show 8 u32 values, each of which needs at most 8
hexadecimal characters to be shown entirely.
This commit is contained in:
Jelle Raaijmakers 2021-10-25 00:22:19 +02:00 committed by Brian Gianforcaro
parent e71e9de61f
commit 00f36fc5ae

View file

@ -187,10 +187,11 @@ static bool check_value_conformance(const TestSuite& test)
if (arg_value != value) {
auto arg_ptr = (const u32*)arg_value.data();
auto value_ptr = (const u32*)value.data();
printf(" value %zu FAIL, expected %04x%04x%04x%04x%04x%04x%04x%04x but got %04x%04x%04x%04x%04x%04x%04x%04x\n",
i,
printf(" value %zu FAIL,\n", i);
printf(" expected %08x%08x%08x%08x%08x%08x%08x%08x\n",
value_ptr[0], value_ptr[1], value_ptr[2], value_ptr[3],
value_ptr[4], value_ptr[5], value_ptr[6], value_ptr[7],
value_ptr[4], value_ptr[5], value_ptr[6], value_ptr[7]);
printf(" but got %08x%08x%08x%08x%08x%08x%08x%08x\n",
arg_ptr[0], arg_ptr[1], arg_ptr[2], arg_ptr[3],
arg_ptr[4], arg_ptr[5], arg_ptr[6], arg_ptr[7]);
fail = true;