Skip to content

Commit

Permalink
Item1326: Tests should not only assert on failure - that gives an inc…
Browse files Browse the repository at this point in the history
…orrect report on the number of passing tests

git-svn-id: http://svn.foswiki.org/trunk@8213 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelTempest authored and MichaelTempest committed Jul 17, 2010
1 parent b199320 commit 7732147
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorBase.pm
Expand Up @@ -122,7 +122,10 @@ sub assert_tml_equals {
$actual ||= '';
$actual =~ s/\n$//s;
$expected =~ s/\n$//s;
unless ( $expected eq $actual ) {
if ( $expected eq $actual ) {
$this->assert( 1 );
}
else {
my $expl =
"==$name== Expected TML:\n"
. encode($expected)
Expand Down Expand Up @@ -158,6 +161,9 @@ sub assert_tml_not_equals {
. "\n==$name==\n";
$this->assert( 0, $expl . "\n" );
}
else {
$this->assert( 1 );
}
}

1;
Expand Down

0 comments on commit 7732147

Please sign in to comment.