-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is_refcount() doesn't support check objects #938
Comments
The idea here is that you would use is(get_ref_count($thing), 2);
is(get_ref_count($thing), greater_than(2)); Adding more tools that emulate is() makes little sense. Though under the hood you could wrap the is() code in refcount_is() to support refcount_is($thing, $check) that opens the door for checking that the refcount is a hash or has a deeply nested structure. |
We talked in person and decided on this interface: is($thing, refcnt(5), "refcount is 5");
is($thing, refcnt(5,10), "refcount is between 5 and 10");
is($thing, refcnt($check), "refcount matches the specified check"); refcnt() is not necessarily the name to use, but similar. |
wouldn't you want to put that is $thing, meta {
prop refcount => $check;
}, 'refcount matches the check' |
It appears to be using plain numerical
==
comparison.causes:
It'd be handy to support proper use of check objects - especially when combined with Test-More/Test2-Suite#258 - as this would permit
The text was updated successfully, but these errors were encountered: