Permalink
Browse files

Merge branch 'alt-struct-fail' into multi-struct-fail

Conflicts:
	perl/t/lib/Test/RxTester.pm
  • Loading branch information...
tamias committed Jul 6, 2011
2 parents 60438a6 + b1fd8ad commit 1552be8a0c941658ee2d8bb3646dac36d4391ae3
Showing with 7 additions and 4 deletions.
  1. +7 −4 perl/t/lib/Test/RxTester.pm
@@ -80,12 +80,14 @@ sub assert_pass {
my ($schema, $schema_desc, $input, $input_desc)
= @$arg{ qw(schema schema_desc input input_desc) };
my $desc = "$schema_desc should ACCEPT $input_desc";
try {
$schema->validate($input);
Test::More::pass("$schema_desc should ACCEPT $input_desc");
Test::More::pass("$desc");
} catch {
my $fails = $_;
Test::More::fail("$schema_desc should ACCEPT $input_desc");
Test::More::fail("$desc");
(my $diag = "$fails") =~ s/^/ /mg;
Test::More::diag($diag);
@@ -97,12 +99,13 @@ sub assert_fail {
my ($schema, $schema_desc, $schema_spec, $input, $input_desc, $want, $want_struct)
= @$arg{ qw(schema schema_desc schema_spec input input_desc want want_struct) };
my $desc = "$schema_desc should REJECT $input_desc";
try {
$schema->validate($input);
Test::More::fail("$schema_desc should REJECT $input_desc");
Test::More::fail($desc);
} catch {
my $fails = $_;
my $desc = "$schema_desc should REJECT $input_desc";
my $ok = 1;
my @diag;

0 comments on commit 1552be8

Please sign in to comment.