Decl
NAME
Test::Async::Decl
- declarations for writing new bundles
SYNOPSIS
use Test::Async::Decl;
unit test-bundle MyBundle;
method my-tool(...) is test-tool(:name<mytool>, :!skippable, :!readify) {
...
}
This module exports declarations needed to write custom bundles for Test::Async
framework.
test-bundle
Declares a bundle role backed by Test::Async::Metamodel::BundleHOW metaclass.
test-reporter
Declares a bundle role wishing to act as a reporter. Backed by Test::Async::Metamodel::ReporterHOW metaclass. The bundle also consumes Test::Async::Reporter role.
test-hub
This kind of package creates a hub class which is backed by Test::Async::Metamodel::HubHOW metaclass. Barely useful for a third-party developer.
&trait_mod:<is>(Method:D \meth, :$test-tool!)
This trait is used to declare a method in a bundle as a test tool:
method foo(...) is test-tool {
...
}
The method is then exported to user as &foo
routine. Internally the method is getting wrapped into a code which
does necessary preparations for the tool to act as expected. See
Test::Async::Metamodel::BundleClassHOW
for more details.
The following named parameters are accepted by the trait:
tool-name
akaname
skippable
akaskip
readify
wrappable
akawrap
They correspond to same-named attributes of
Test::Async::TestTool.
By default skippable
, readify
, and wrappable
are set to True. Thus it rather makes sense to negate them, as
shown in the #SYNOPSIS.
SEE ALSO
Test::Async::Manual, Test::Async::Metamodel::BundleHOW, Test::Async::Metamodel::BundleClassHOW, Test::Async::Metamodel::HubHOW, Test::Async::Metamodel::ReporterHOW
AUTHOR
Vadim Belman <[email protected]>