目錄

名稱

Test2::Event::Plan - 計畫的事件

說明

只要宣告計畫、呼叫完成測試或子文字完成,就會觸發計畫事件。

範例

use Test2::API qw/context/;
use Test2::Event::Plan;

my $ctx = context();

# Plan for 10 tests to run
my $event = $ctx->plan(10);

# Plan to skip all tests (will exit 0)
$ctx->plan(0, skip_all => "These tests need to be skipped");

存取器

$num = $plan->max

取得預期測試的數量

$dir = $plan->directive

取得指令 (例如 TODO、skip_all 或 no_plan)。

$reason = $plan->reason

取得指令的原因。

原始碼

Test2 的原始碼存放庫位於 http://github.com/Test-More/test-more/

維護人員

Chad Granum <exodist@cpan.org>

作者

Chad Granum <exodist@cpan.org>

著作權

Copyright 2020 Chad Granum <exodist@cpan.org>。

本程式為自由軟體;您可以在與 Perl 相同的條款下重新散布或修改它。

請參閱 http://dev.perl.org/licenses/