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) {
    ...
}

DESCRIPTION

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 aka name

  • skippable aka skip

  • readify

  • wrappable aka wrap

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]

Test::Async v0.0.16

Thread-safe testing framework

Authors

  • Vadim Belman

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Test::Async
  • Test::Async::Aggregator
  • Test::Async::Base
  • Test::Async::Decl
  • Test::Async::Event
  • Test::Async::Hub
  • Test::Async::Job
  • Test::Async::JobMgr
  • Test::Async::Metamodel::BundleClassHOW
  • Test::Async::Metamodel::BundleHOW
  • Test::Async::Metamodel::HubHOW
  • Test::Async::Metamodel::ReporterHOW
  • Test::Async::Reporter
  • Test::Async::Reporter::TAP
  • Test::Async::Result
  • Test::Async::TestTool
  • Test::Async::Utils
  • Test::Async::When
  • Test::Async::X

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.