Skip to content

Commit

Permalink
Merge pull request #338 from tom-binary/test/data_checks_exception_fo…
Browse files Browse the repository at this point in the history
…rmat

Test/data checks exception format
  • Loading branch information
tom-binary authored Aug 20, 2024
2 parents ec93653 + 587c451 commit e4a18a4
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/Myriad/Class.pm
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ sub import {
}

if(my $class = $args{class} // $pkg) {
Object::Pad->import_into($pkg, ":experimental(init_expr mop custom_field_attr adjust_params)");
Object::Pad->import_into($pkg, ":experimental(init_expr mop custom_field_attr)");

my $method = 'begin_' . ($args{type} || 'class');
Module::Load::load($args{extends}) if $args{extends};
Expand Down
2 changes: 1 addition & 1 deletion t/RPC/full-cycle.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use Log::Any::Adapter qw(TAP);

use Future;
use Future::AsyncAwait;
use Object::Pad qw(:experimental);
use Object::Pad;

my ($ping_service, $pong_service);

Expand Down
2 changes: 1 addition & 1 deletion t/RPC/overflow-protection.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use Myriad::Transport::Memory;
use Myriad::Transport::Redis;
use Myriad::RPC::Message;
use Sys::Hostname qw(hostname);
use Object::Pad qw(:experimental);
use Object::Pad qw(:experimental(mop));

use Myriad;

Expand Down
2 changes: 1 addition & 1 deletion t/RPC/pending-requests.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use Myriad::Transport::Memory;
use Myriad::Transport::Redis;
use Myriad::RPC::Message;
use Sys::Hostname qw(hostname);
use Object::Pad qw(:experimental);
use Object::Pad qw(:experimental(mop));

use Myriad;

Expand Down
2 changes: 1 addition & 1 deletion t/commands.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Test::MockObject;
use Test::Fatal;
use Test::Deep;

use Object::Pad qw(:experimental);
use Object::Pad qw(:experimental(mop));
use Log::Any::Adapter qw(TAP);

use Future::AsyncAwait;
Expand Down
2 changes: 1 addition & 1 deletion t/myriad.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use Test::MockObject;
use Future::AsyncAwait;
use IO::Async::Test;

use Object::Pad qw(:experimental);
use Object::Pad qw(:experimental(mop));

sub loop_notifiers {
my $loop = shift;
Expand Down
2 changes: 1 addition & 1 deletion t/registry.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use IO::Async::Test;
use Future::AsyncAwait;
# Needed to set Testing::Service method names without fully defining service as Myriad::Service
use Sub::Util qw(subname set_subname);
use Object::Pad qw(:experimental);
use Object::Pad qw(:experimental(mop));

use Myriad;
use Myriad::Registry;
Expand Down
4 changes: 2 additions & 2 deletions t/syntax.t
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ subtest 'Myriad::Class :v2' => sub {
}, undef, 'can check numeric >= 5');
like(exception {
$obj->checked(-3)
}, qr/\Qsatisfying :Checked(NumGE(5))/, 'numeric check fails on number out of range');
}, qr/\Qsatisfying NumGE(5)/, 'numeric check fails on number out of range');
like(exception {
$obj->checked('xx')
}, qr/\Qsatisfying :Checked(NumGE(5))/, 'numeric check fails on invalid number');
}, qr/\Qsatisfying NumGE(5)/, 'numeric check fails on invalid number');
done_testing;
};
done_testing;
Expand Down

0 comments on commit e4a18a4

Please sign in to comment.