Test2::Compare::Bag - Internal representation of a bag comparison.
This module is an internal representation of a bag for comparison purposes.
Set this to true if you would like to fail when the array being validated has more items than the check. That is, if you check for 4 items but the array has 5 values, it will fail and list that unmatched item in the array as unexpected. If set to false then it is assumed you do not care about extra items.
Returns the arrayref of values to be checked in the array.
Accepts an arrayref.
Note: that there is no validation when using set_items, it is better to use the add_item interface.
set_items
add_item
Always returns the string "<BAG>".
"<BAG>"
Check if $got is an array reference or not.
$got
Push an item onto the list of values to be checked.
Find the differences between the expected bag values and those in the $got arrayref.
The source code repository for Test2-Suite can be found at https://github.com/Test-More/Test2-Suite/.
Copyright 2018 Chad Granum <exodist@cpan.org>.
Copyright 2018 Gianni Ceccarelli <dakkar@thenautilus.net>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
To install Test2::Suite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test2::Suite
CPAN shell
perl -MCPAN -e shell install Test2::Suite
For more information on module installation, please visit the detailed CPAN module installation guide.