sub lives-ok
Documentation for sub lives-ok
assembled from the following types:
module Test
From Test
(Test) sub lives-ok
Defined as:
multi sub lives-ok(Callable $code, $reason = '')
Marks a test as passed if the given $code
does not throw an exception.
The function accepts an optional description of the test.
sub frodo(Bool :$destroys-ring) { die "Oops, that wasn't supposed to happen" unless $destroys-ring; } lives-ok { frodo(destroys-ring => True) }, "Frodo survives";