1#!perl -T
2
3use warnings;
4use strict;
5
6use Test::More tests => 11;
7
8use List::Cycle;
9
10my $cycle = List::Cycle->new( {vals=> [2112, 5150, 90125]} );
11isa_ok( $cycle, 'List::Cycle' );
12
13is( $cycle->next,  2112, q{We are the priests} );
14$cycle->reset;
15is( $cycle->next,  2112, q{We are the priests again} );
16is( $cycle->next,  5150, q{Why can't this be love} );
17is( $cycle->next, 90125, q{You can fool yourself} );
18is( $cycle->next,  2112, q{What can this strange device be?} );
19is( $cycle->next,  5150, q{That's what dreams are made of} );
20is( $cycle->next, 90125, q{You can cheat until you're blind} );
21is( $cycle->next,  2112, q{You don't get something for nothing} );
22is( $cycle->next,  5150, q{Why can't this be love} );
23$cycle->reset;
24is( $cycle->next,  2112, q{We are the priests for a third time} );
25