NAME
t/library/p6object.t -- P6object tests
SYNOPSIS
% prove t/library/p6object.t
DESCRIPTION
Testing Perl 6 objects.
SUBROUTINES
- p6obj_tests(proto, class [, options])
-
Run a sequence of standard tests on a protoobject. As part of the tests it also creates an instance using the
.newmethod ofproto, does some tests on the instance, and returns it. The available options include:shortname the name expected from stringifying the protoobject typename the name expected from C<typeof> isa a list of classes to test for "isa" semantics - concat([args])
-
Concatenate several strings into a single string.
- qw(value)
-
If
valueis already an array of some sort, return it, otherwise splitvalueon spaces and return that. - hash_default(hash, key, default)
-
Return the entry in
hash[key]if it exists, otherwise returndefault. - is_same(x, y, message)
-
Test for x and y being the same PMC.
- isa_ok(object, class, objectname)
- isa_ok(object, class, objectname)
-
Test if
objectis/isn't an instance ofclassas reported by theisaopcode.objectnameis used to generate the diagnostic message in output (i.e., it's not the actual diagnostic message).