MarpaX-Languages-PowerBuilder

 view release on metacpan or  search on metacpan

t/lib/TestFunctions.pm  view on Meta::CPAN

our @EXPORT_OK   = qw(
  _is_deep_diff
  _read_json
);

our $VERSION = '0.00';


###############################################################################
#
# Use Test::Differences::eq_or_diff() where available or else fall back to
# using Test::More::is_deeply().
#
sub _is_deep_diff {
    my ( $got, $expected, $caption, $context ) = @_;
    $context //= { context => 20 };
    eval {
        require Test::Differences;
        Test::Differences->import();
    };

    if ( !$@ ) {
        eq_or_diff( $got, $expected, $caption, $context );
    }
    else {
        is_deeply( $got, $expected, $caption );
    }

}



( run in 0.314 second using v1.01-cache-2.11-cpan-131fc08a04b )