forked from starnakin/IronGOLEM
109 lines
1.6 KiB
Plaintext
109 lines
1.6 KiB
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_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';
|
|
}
|
|
|
|
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);
|
|
}
|
|
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);
|
|
}
|
|
else
|
|
{
|
|
putstr(": OK: ");
|
|
putstr(description);
|
|
}
|
|
wrt '\n';
|
|
}
|