mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
Tests: Use correct argument count for value conformance in TestScanf
This commit is contained in:
parent
65bcee3c62
commit
e3f17401cb
1 changed files with 3 additions and 3 deletions
|
@ -180,14 +180,14 @@ bool g_any_failed = false;
|
|||
static bool check_value_conformance(const TestSuite& test)
|
||||
{
|
||||
bool fail = false;
|
||||
for (int i = 0; i < test.expected_output; ++i) {
|
||||
for (size_t i = 0; i < test.argument_count; ++i) {
|
||||
auto& arg = test.arguments[i];
|
||||
auto arg_value = arg_to_value_t(arg);
|
||||
auto& value = test.expected_values[i];
|
||||
if (arg_value != value) {
|
||||
auto arg_ptr = (const u32*)arg_value.data();
|
||||
auto value_ptr = (const u32*)value.data();
|
||||
printf(" value %d FAIL, expected %04x%04x%04x%04x%04x%04x%04x%04x but got %04x%04x%04x%04x%04x%04x%04x%04x\n",
|
||||
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,
|
||||
value_ptr[0], value_ptr[1], value_ptr[2], value_ptr[3],
|
||||
value_ptr[4], value_ptr[5], value_ptr[6], value_ptr[7],
|
||||
|
@ -195,7 +195,7 @@ static bool check_value_conformance(const TestSuite& test)
|
|||
arg_ptr[4], arg_ptr[5], arg_ptr[6], arg_ptr[7]);
|
||||
fail = true;
|
||||
} else {
|
||||
printf(" value %d PASS\n", i);
|
||||
printf(" value %zu PASS\n", i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue