File: 3_zero_seconds.t

package info (click to toggle)
libschedule-ratelimiter-perl 0.01-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 84 kB
  • sloc: perl: 47; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 450 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#use Test::More qw( no_plan );
use Test::More tests => 22;

use Schedule::RateLimiter;
ok(1, 'Did the Schedule::RateLimiter module load?'); # If we made it this far, we're ok.

#########################

my $throttle = Schedule::RateLimiter->new( seconds => 0, iterations => 1 );
ok ( ref( $throttle ), 'Did we build a zero-second Schedule::RateLimiter?' );

for ( 1.. 20 ) {
    ok ( $throttle->event(block => 0), "Test 0-second Throttle: $_" );
}