From: Arthur Axel 'fREW' Schmidt Date: Sat, 13 Feb 2010 20:30:36 +0000 (-0600) Subject: fix parens and use eq_array X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FData-Dumper-Concise.git;a=commitdiff_plain;h=e2d594412c676f886fec895b3286177107c35694 fix parens and use eq_array --- diff --git a/t/sugar.t b/t/sugar.t index 4051338..d76f7c4 100644 --- a/t/sugar.t +++ b/t/sugar.t @@ -16,30 +16,27 @@ BEGIN { DWARN: { my @foo = Dwarn 'warn', 'friend'; - is $warned_string,qq{"warn"\n"friend"\n}, 'Dwarn warns'; + is( $warned_string,qq{"warn"\n"friend"\n}, 'Dwarn warns' ); - ok eq_array(\@foo, ['warn','friend']), 'Dwarn passes through correctly'; + ok( eq_array(\@foo, ['warn','friend']), 'Dwarn passes through correctly' ); } DWARNS: { my $bar = DwarnS 'robot',2,3; - is $warned_string,qq{"robot"\n}, 'DwarnS warns'; - is $bar, 'robot', 'DwarnS passes through correctly'; + is( $warned_string,qq{"robot"\n}, 'DwarnS warns' ); + is( $bar, 'robot', 'DwarnS passes through correctly' ); } DWARNONLY: { my @foo = Dwarn_only { $_[0] } qw(one two three); - is $warned_string,qq{"one"\n}, 'Dwarn_only warns requested data'; + is( $warned_string,qq{"one"\n}, 'Dwarn_only warns requested data' ); - ok eq_array(\@foo, [qw{one two three}]), 'Dwarn_only passes through correctly'; + ok( eq_array(\@foo, [qw{one two three}]), 'Dwarn_only passes through correctly' ); } DWARNSONLY: { my $bar = DwarnS_only { $_->[0] } [ qw(one two three) ]; - is $warned_string,qq{"one"\n}, 'DwarnS_only warns requested data'; + is( $warned_string,qq{"one"\n}, 'DwarnS_only warns requested data' ); - ok $bar->[0] eq 'one' && - $bar->[1] eq 'two' && - $bar->[2] eq 'three' && - @{$bar} == 3, 'DwarnS_only passes through correctly'; + ok( eq_array( $bar, [ qw{one two three} ] ), 'DwarnS_only passes through correctly' ); }