.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "IO::Async::LoopTests 3pm" .TH IO::Async::LoopTests 3pm 2024-02-04 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME "IO::Async::LoopTests" \- acceptance testing for IO::Async::Loop subclasses .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use IO::Async::LoopTests; \& run_tests( \*(AqIO::Async::Loop::Shiney\*(Aq, \*(Aqio\*(Aq ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module contains a collection of test functions for running acceptance tests on IO::Async::Loop subclasses. It is provided as a facility for authors of such subclasses to ensure that the code conforms to the Loop API required by IO::Async. .SH TIMING .IX Header "TIMING" Certain tests require the use of timers or timed delays. Normally these are counted in units of seconds. By setting the environment variable \&\f(CW\*(C`TEST_QUICK_TIMERS\*(C'\fR to some true value, these timers run 10 times quicker, being measured in units of 0.1 seconds instead. This value may be useful when running the tests interactively, to avoid them taking too long. The slower timers are preferred on automated smoke-testing machines, to help guard against false negatives reported simply because of scheduling delays or high system load while testing. .PP .Vb 1 \& $ TEST_QUICK_TIMERS=1 ./Build test .Ve .SH FUNCTIONS .IX Header "FUNCTIONS" .SS run_tests .IX Subsection "run_tests" .Vb 1 \& run_tests( $class, @tests ); .Ve .PP Runs a test or collection of tests against the loop subclass given. The class being tested is loaded by this function; the containing script does not need to \f(CW\*(C`require\*(C'\fR or \f(CW\*(C`use\*(C'\fR it first. .PP This function runs \f(CW\*(C`plan\*(C'\fR to output its expected test count; the containing script should not do this. .SH "TEST SUITES" .IX Header "TEST SUITES" The following test suite names exist, to be passed as a name in the \f(CW@tests\fR argument to \f(CW\*(C`run_tests\*(C'\fR: .SS io .IX Subsection "io" Tests the Loop's ability to watch filehandles for IO readiness .SS timer .IX Subsection "timer" Tests the Loop's ability to handle timer events .SS signal .IX Subsection "signal" Tests the Loop's ability to watch POSIX signals .SS idle .IX Subsection "idle" Tests the Loop's support for idle handlers .SS process .IX Subsection "process" Tests the Loop's support for watching child processes by PID .PP (Previously called \f(CW\*(C`child\*(C'\fR) .SS control .IX Subsection "control" Tests that the \f(CW\*(C`run\*(C'\fR, \f(CW\*(C`stop\*(C'\fR, \f(CW\*(C`loop_once\*(C'\fR and \f(CW\*(C`loop_forever\*(C'\fR methods behave correctly .SS metrics .IX Subsection "metrics" Tests that metrics are generated appropriately using Metrics::Any. .SH AUTHOR .IX Header "AUTHOR" Paul Evans