1package Test::ANTLR::Runtime::ANTLRStringStream; 2 3use ANTLR::Runtime::ANTLRStringStream; 4use Test::More; 5 6use Moose; 7 8BEGIN { extends 'My::Test::Class' } 9 10sub consume : Test(2) { 11 my ($self) = @_; 12 13 my $s = $self->class->new({ input => 'ABC' }); 14 is $s->LA(1), 'A'; 15 $s->consume(); 16 is $s->LA(1), 'B'; 17} 18 19sub LA : Test(5) { 20 my ($self) = @_; 21 22 my $s = $self->class->new({ input => 'ABC' }); 23 is $s->LA(0), undef; 24 is $s->LA(1), 'A'; 25 is $s->LA(2), 'B'; 26 is $s->LA(3), 'C'; 27 is $s->LA(4), ANTLR::Runtime::ANTLRStringStream->EOF; 28} 29 30no Moose; 31__PACKAGE__->meta->make_immutable(inline_constructor => 0); 321; 33