Lines Matching full:api
6 use Test2::API qw/context/;
10 $INIT = Test2::API::test2_init_done;
11 $LOADED = Test2::API::test2_load_done;
17 my $CLASS = 'Test2::API';
20 ok(Test2::API->can($_), "$_ method is present") for qw{
59 ok(Test2::API::test2_load_done, "We loaded it");
75 Test2::API::test2_add_callback_exit(
83 my $old = Test2::API::Instance->can('set_exit');
85 *Test2::API::Instance::set_exit = sub {
164 Test2::API::context_do {
200 Test2::API::no_context {
218 Test2::API::no_context {
238 Test2::API::no_context {
267 Test2::API::test2_add_callback_context_acquire($sub);
268 Test2::API::test2_add_callback_context_init($sub);
269 Test2::API::test2_add_callback_context_release($sub);
270 Test2::API::test2_add_callback_exit($sub);
271 Test2::API::test2_add_callback_post_load($sub);
273 is((grep { $_ == $sub } Test2::API::test2_list_context_acquire_callbacks()), 1, "got the one instan…
274 is((grep { $_ == $sub } Test2::API::test2_list_context_init_callbacks()), 1, "got the one instan…
275 is((grep { $_ == $sub } Test2::API::test2_list_context_release_callbacks()), 1, "got the one instan…
276 is((grep { $_ == $sub } Test2::API::test2_list_exit_callbacks()), 1, "got the one instan…
277 is((grep { $_ == $sub } Test2::API::test2_list_post_load_callbacks()), 1, "got the one instan…
279 Test2::API::test2_add_callback_context_acquire($sub);
280 Test2::API::test2_add_callback_context_init($sub);
281 Test2::API::test2_add_callback_context_release($sub);
282 Test2::API::test2_add_callback_exit($sub);
283 Test2::API::test2_add_callback_post_load($sub);
285 is((grep { $_ == $sub } Test2::API::test2_list_context_acquire_callbacks()), 2, "got the two instan…
286 is((grep { $_ == $sub } Test2::API::test2_list_context_init_callbacks()), 2, "got the two instan…
287 is((grep { $_ == $sub } Test2::API::test2_list_context_release_callbacks()), 2, "got the two instan…
288 is((grep { $_ == $sub } Test2::API::test2_list_exit_callbacks()), 2, "got the two instan…
289 is((grep { $_ == $sub } Test2::API::test2_list_post_load_callbacks()), 2, "got the two instan…
291 ok(!Test2::API::test2_is_testing_done(), "Testing is not done");
295 die "Testing should be done, but it is not!" unless Test2::API::test2_is_testing_done();
301 return if Test2::API::test2_is_testing_done();