From 1cf8b248836a0ec35e6c389286fe4b46118cb379 Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 17 Jun 2016 17:05:56 +0100 Subject: 'bag' is in Test2::Suite 0.000032! --- t/lib/Test2/Tools/MoreCompare.pm | 55 ---------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 t/lib/Test2/Tools/MoreCompare.pm (limited to 't/lib/Test2/Tools/MoreCompare.pm') diff --git a/t/lib/Test2/Tools/MoreCompare.pm b/t/lib/Test2/Tools/MoreCompare.pm deleted file mode 100644 index 7ff16ab..0000000 --- a/t/lib/Test2/Tools/MoreCompare.pm +++ /dev/null @@ -1,55 +0,0 @@ -package Test2::Tools::MoreCompare; -use strict; -use warnings; - -use Carp qw/croak/; -use Scalar::Util qw/reftype/; - -use Test2::API qw/context/; -use Test2::Util::Ref qw/rtype/; - -use Test2::Compare qw{ - compare - get_build push_build pop_build build - strict_convert relaxed_convert -}; - -use Test2::Compare::Bag(); - -%Carp::Internal = ( - %Carp::Internal, - 'Test2::Tools::MoreCompare' => 1, - 'Test2::Compare::Bag' => 1, -); - -our @EXPORT_OK = qw{ - bag call_list -}; -use base 'Exporter'; - -sub bag(&) { build('Test2::Compare::Bag', @_) } - -sub call_list($$) { - my ($name, $expect) = @_; - my $build = get_build() or croak "No current build!"; - - croak "'$build' does not support method calls" - unless $build->can('add_call'); - - croak "'call_list' should only ever be called in void context" - if defined wantarray; - - my @caller = caller; - $build->add_call( - sub { [ shift->$name ] }, - Test2::Compare::Wildcard->new( - expect => $expect, - file => $caller[1], - lines => [$caller[2]], - ), - $name, - ); - -} - -1; -- cgit v1.2.3