2023-06-13 07:15:20 -04:00
|
|
|
global name;
|
|
|
|
|
2023-06-18 05:11:23 -04:00
|
|
|
test_str(value, reach_value, description)
|
2023-06-12 14:26:35 -04:00
|
|
|
{
|
|
|
|
putstr(name);
|
2023-06-18 06:39:18 -04:00
|
|
|
if (strcmp(value, reach_value))
|
2023-06-12 14:26:35 -04:00
|
|
|
{
|
|
|
|
putstr(": ERROR: ");
|
|
|
|
putstr(", ");
|
2023-06-13 07:15:20 -04:00
|
|
|
putstr(description);
|
2023-06-12 14:26:35 -04:00
|
|
|
putstr(" [");
|
|
|
|
putstr(reach_value);
|
|
|
|
putstr(" != ");
|
|
|
|
putstr(value);
|
|
|
|
putstr("]");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
putstr(": OK: ");
|
2023-06-13 07:15:20 -04:00
|
|
|
putstr(description);
|
2023-06-12 14:26:35 -04:00
|
|
|
}
|
|
|
|
wrt '\n';
|
|
|
|
}
|
2023-06-18 06:39:18 -04:00
|
|
|
|
2023-06-18 14:03:27 -04:00
|
|
|
test_num(value, reach_value, description)
|
2023-06-18 06:39:18 -04:00
|
|
|
{
|
|
|
|
putstr(name);
|
|
|
|
if (value != reach_value)
|
|
|
|
{
|
|
|
|
putstr(": ERROR: ");
|
|
|
|
putstr(", ");
|
|
|
|
putstr(description);
|
|
|
|
putstr(" [");
|
2023-06-18 11:12:45 -04:00
|
|
|
putnum(reach_value);
|
2023-06-18 06:39:18 -04:00
|
|
|
putstr(" != ");
|
2023-06-18 11:12:45 -04:00
|
|
|
putnum(value);
|
2023-06-18 06:39:18 -04:00
|
|
|
putstr("]");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
putstr(": OK: ");
|
|
|
|
putstr(description);
|
|
|
|
}
|
|
|
|
wrt '\n';
|
|
|
|
}
|
2023-06-18 13:42:57 -04:00
|
|
|
|
2023-06-18 14:25:15 -04:00
|
|
|
test_num_s(value, reach_value, description)
|
|
|
|
{
|
|
|
|
putstr(name);
|
|
|
|
if (value != reach_value)
|
|
|
|
{
|
|
|
|
putstr(": ERROR: ");
|
|
|
|
putstr(", ");
|
|
|
|
putstr(description);
|
|
|
|
putstr(" [");
|
|
|
|
putnum_s(reach_value);
|
|
|
|
putstr(" != ");
|
|
|
|
putnum_s(value);
|
|
|
|
putstr("]");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
putstr(": OK: ");
|
|
|
|
putstr(description);
|
|
|
|
}
|
|
|
|
wrt '\n';
|
|
|
|
}
|
|
|
|
|
2023-06-18 13:42:57 -04:00
|
|
|
test_tab_str(value, reach_value, description)
|
|
|
|
{
|
|
|
|
putstr(name);
|
|
|
|
if (tabcmp_str(value, reach_value))
|
|
|
|
{
|
|
|
|
putstr(": ERROR: ");
|
|
|
|
putstr(", ");
|
|
|
|
putstr(description);
|
|
|
|
puttab_str(reach_value);
|
|
|
|
putstr(" != ");
|
|
|
|
puttab_str(value);
|
2023-06-24 10:10:40 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
putstr(": OK: ");
|
|
|
|
putstr(description);
|
|
|
|
}
|
|
|
|
wrt '\n';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
test_tab_num(value, reach_value, size, description)
|
|
|
|
{
|
|
|
|
putstr(name);
|
|
|
|
if (tabcmp_num(value, reach_value, size))
|
|
|
|
{
|
|
|
|
putstr(": ERROR: ");
|
|
|
|
putstr(", ");
|
|
|
|
putstr(description);
|
|
|
|
puttab_num(reach_value, size);
|
|
|
|
putstr(" != ");
|
|
|
|
puttab_num(value, size);
|
2023-06-18 13:42:57 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
putstr(": OK: ");
|
|
|
|
putstr(description);
|
|
|
|
}
|
|
|
|
wrt '\n';
|
|
|
|
}
|