You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be great if there were some test assertions for refcounts. A copy of those in Test::Refcount would be lovely:
{
my$arr = [];
is_oneref( $arr, "Array has one reference initially" );
my$acopy = $arr;
is_refcount( $arr, 2, "Array has two references now" );
undef$acopy;
is_oneref( $arr, "Array is back to one reference now" );
}
For docs you can just copy the ones out of Test::Refcount if required:
=head2 is_refcount
is_refcount( $object, $count, $name )
Test that $object has $count references to it.
=head2 is_oneref
is_oneref( $object, $name )
Assert that the $object has only 1 reference to it.
=cut
The text was updated successfully, but these errors were encountered:
https://github.com/wolfsage/scratchpg has a conversion of the .pm file and one of the tests to show how it could be done. I could maybe do more later to make it into a Test2::Suite addon...
It'd be great if there were some test assertions for refcounts. A copy of those in Test::Refcount would be lovely:
For docs you can just copy the ones out of
Test::Refcount
if required:The text was updated successfully, but these errors were encountered: