Skip to content

Commit

Permalink
Item11956: Put expected failures closer to bottom
Browse files Browse the repository at this point in the history
I think people read the summary from the bottom-up, or am I just weird?

So I've made the summary kind of read from most-important to least,
bottom-up.

git-svn-id: http://svn.foswiki.org/trunk@15043 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jun 19, 2012
1 parent 8526647 commit a3c5534
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions UnitTestContrib/lib/Unit/TestRunner.pm
Original file line number Diff line number Diff line change
Expand Up @@ -197,29 +197,6 @@ sub start {
#print join( "\n\t", @{ $this->{unexpected_passes} } );
$actual_incorrect_passes = $failed;
}
if ( my $failed =
scalar( map { keys %{$_} } values %{ $this->{expected_failures} } ) )
{
print "\n$failed expected failure" . ( $failed > 1 ? 's' : '' ) . ":\n";
while ( my ( $suite, $tests ) = each %{ $this->{expected_failures} } ) {
my $ntests = scalar( keys %{$tests} );

print "$suite has $ntests expected failure"
. ( $ntests > 1 ? 's' : '' )
. " (of $this->{tests_per_module}{$suite}):\n";
while ( my ( $test, $reason ) = each %{$tests} ) {
my @annotations = $this->get_annotations($test);

if ( scalar(@annotations) ) {
print "\t$test: " . join( '; ', @annotations ) . "\n";
}
else {
print "\t$test\n";
}
}
}
$actual_correct_failures = $failed;
}
if ( my $skipped_tests =
scalar( map { keys %{$_} } values %{ $this->{skipped_tests} } ) )
{
Expand All @@ -230,7 +207,7 @@ sub start {
print
"$suite skipped $ntests (of $this->{tests_per_module}{$suite}):\n";
while ( my ( $test, $reason ) = each %{$tests} ) {
print "\t$test - $reason\n";
print " * $test - $reason\n";
}
}
$skipped_tests_total = $skipped_tests;
Expand All @@ -239,7 +216,7 @@ sub start {
print "\n$skipped_suites skipped suite"
. ( $skipped_suites > 1 ? 's' : '' ) . ":\n";
while ( my ( $suite, $detail ) = each %{ $this->{skipped_suites} } ) {
print "\t$suite ($detail->{tests}) - $detail->{reason}\n";
print " * $suite ($detail->{tests}) - $detail->{reason}\n";
$skipped_tests_total += $detail->{tests};
}
}
Expand All @@ -248,6 +225,29 @@ sub start {
$actual_incorrect_failures += 1;
}
}
if ( my $failed =
scalar( map { keys %{$_} } values %{ $this->{expected_failures} } ) )
{
print "\n$failed expected failure" . ( $failed > 1 ? 's' : '' ) . ":\n";
while ( my ( $suite, $tests ) = each %{ $this->{expected_failures} } ) {
my $ntests = scalar( keys %{$tests} );

print "$suite has $ntests expected failure"
. ( $ntests > 1 ? 's' : '' )
. " (of $this->{tests_per_module}{$suite}):\n";
while ( my ( $test, $reason ) = each %{$tests} ) {
my @annotations = $this->get_annotations($test);

if ( scalar(@annotations) ) {
print " * $test: " . join( '; ', @annotations ) . "\n";
}
else {
print " * $test\n";
}
}
}
$actual_correct_failures = $failed;
}

$total =
$passes +
Expand Down

0 comments on commit a3c5534

Please sign in to comment.