Commit 65560971 authored by Guillaume Huard's avatar Guillaume Huard
Browse files

Reworked limits part

parent 362c59a0
......@@ -424,22 +424,23 @@ sub perform_tests($$) {
code => "returned the code",
signal => "received the signal" };
if (defined($test->{$part}) || ($data->{$part})) {
if ($data->{${part}.'_bounded'}) {
$details .= "Your program standard $part has reached the upper limit";
$details .= ", still testing it" if defined($test->{$part});
} else {
$details .= "Your program $description->{$part}:\n".preformat($data->{$part});
}
$details .= "Your program $description->{$part}:\n".preformat($data->{$part});
if (defined($test->{$part})) {
my $local_result = ($data->{$part} eq $test->{$part});
if (!$local_result) {
$details .= "\nBut the expectation was:\n".preformat($test->{$part})."\n";
if ($data->{${part}.'_bounded'}) {
$details .=
"\nYour program standard $part has reached the upper limit (failure)\n";
$result = 0;
} else {
$details .= " (as expected)\n";
my $local_result = ($data->{$part} eq $test->{$part});
if (!$local_result) {
$details .= "\nBut the expectation was:\n".preformat($test->{$part})."\n";
} else {
$details .= " (as expected)\n";
}
$result = 1 unless defined($result);
$result &&= $local_result;
debug "Done with $part subtest with result $local_result\n";
}
$result = 1 unless defined($result);
$result &&= $local_result;
debug "Done with $part subtest with result $local_result\n";
} else {
$details .= "\n";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment