Permalink
Browse files

[Test::Util] a little refactor

git-svn-id: http://svn.pugscode.org/pugs@28970 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 6068caa commit a586cc353194d6bb4f4d5750f841c3c9f06fb9de kyle committed Nov 1, 2009
Showing with 2 additions and 4 deletions.
  1. +2 −4 packages/Test/Util.pm
View
@@ -37,15 +37,13 @@ multi sub is_run( Str $code, Str $input, %expected, Str $name ) is export(:DEFAU
# Attributes not specified are not tested.
next if ! %expected.exists( $attr );
- my $attr_good;
- $attr_good = %got{$attr} ~~ %expected{$attr};
- my $diag_ok = ?(%got{$attr} ~~ Str|Num);
+ my $attr_good = %got{$attr} ~~ %expected{$attr};
# The check for this attribute failed.
# Note why for a diag() after the test failure is reported.
if !$attr_good {
@diag_q.push( " got $attr: {%got{$attr}.perl}" );
- if $diag_ok {
+ if %expected{$attr} ~~ Str|Num {
@diag_q.push( "expected $attr: {%expected{$attr}.perl}" );
}
}

0 comments on commit a586cc3

Please sign in to comment.