內容

名稱

Test2::EventFacet::Plan - 設定計畫的切面

說明

當事件需要設定計畫時,會使用這個切面。

欄位

$string = $plan->{details}
$string = $plan->details()

計畫設定的人類可讀說明。通常除了 skip 欄位也設定時,大多數格式化程式不會呈現這個說明。

$positive_int = $plan->{count}
$positive_int = $plan->count()

設定預期的斷言數目。當 skipnone 也設定時,通常應該設定為 0

$bool = $plan->{skip}
$bool = $plan->skip()

如果為真,則應略過整個測試。這通常與 details 欄位中的說明和將 terminate 設為 0control 面向配對使用。

$bool = $plan->{none}
$bool = $plan->none()

這主要由設定計畫為 no plan 的舊版 Test::Builder 測試使用,此結構早於更好的 done_testing()

如果您在非舊版程式碼中使用這個,您可能需要重新考慮您的人生方向,也許隱居會適合您?

來源

Test2 的原始碼存放庫可在 http://github.com/Test-More/test-more/ 中找到。

維護人員

Chad Granum <exodist@cpan.org>

作者

Chad Granum <exodist@cpan.org>

版權

版權所有 2020 Chad Granum <exodist@cpan.org>。

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

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