forked from starnakin/IronGOLEM
68 lines
977 B
Plaintext
68 lines
977 B
Plaintext
global name;
|
|
|
|
test_str(value, reach_value, description)
|
|
{
|
|
putstr(name);
|
|
if (strcmp(value, reach_value))
|
|
{
|
|
putstr(": ERROR: ");
|
|
putstr(", ");
|
|
putstr(description);
|
|
putstr(" [");
|
|
putstr(reach_value);
|
|
putstr(" != ");
|
|
putstr(value);
|
|
putstr("]");
|
|
}
|
|
else
|
|
{
|
|
putstr(": OK: ");
|
|
putstr(description);
|
|
}
|
|
wrt '\n';
|
|
}
|
|
|
|
test_num(value, reach_value, description)
|
|
{
|
|
putstr(name);
|
|
if (value != reach_value)
|
|
{
|
|
putstr(": ERROR: ");
|
|
putstr(", ");
|
|
putstr(description);
|
|
putstr(" [");
|
|
putnum(reach_value);
|
|
putstr(" != ");
|
|
putnum(value);
|
|
putstr("]");
|
|
}
|
|
else
|
|
{
|
|
putstr(": OK: ");
|
|
putstr(description);
|
|
}
|
|
wrt '\n';
|
|
}
|
|
|
|
test_tab_str(value, reach_value, description)
|
|
{
|
|
putstr(name);
|
|
if (tabcmp_str(value, reach_value))
|
|
{
|
|
putstr(": ERROR: ");
|
|
putstr(", ");
|
|
putstr(description);
|
|
putstr(" [");
|
|
puttab_str(reach_value);
|
|
putstr(" != ");
|
|
puttab_str(value);
|
|
putstr("]");
|
|
}
|
|
else
|
|
{
|
|
putstr(": OK: ");
|
|
putstr(description);
|
|
}
|
|
wrt '\n';
|
|
}
|