1package Test::ANTLR::Runtime::CommonToken;
2
3use Test::More;
4
5use ANTLR::Runtime::Token;
6
7use Moose;
8
9BEGIN { extends 'My::Test::Class' }
10
11sub constructor : Test(1) {
12    my $token = ANTLR::Runtime::CommonToken->new({
13        input => undef,
14        type => 0,
15        channel => 0,
16        start => 0,
17        stop => 1,
18    });
19    is $token->get_start_index(), 0;
20}
21
22sub same : Test(2) {
23    ok(ANTLR::Runtime::Token->EOF_TOKEN == ANTLR::Runtime::Token->EOF_TOKEN);
24    ok(ANTLR::Runtime::Token->SKIP_TOKEN == ANTLR::Runtime::Token->SKIP_TOKEN);
25}
26
27sub not_same : Test(2) {
28    ok !(ANTLR::Runtime::Token->EOF_TOKEN  != ANTLR::Runtime::Token->EOF_TOKEN);
29    ok !(ANTLR::Runtime::Token->SKIP_TOKEN != ANTLR::Runtime::Token->SKIP_TOKEN);
30}
31
32sub bool_eof : Test(1) {
33    ok !ANTLR::Runtime::Token->EOF_TOKEN;
34}
35
36no Moose;
37__PACKAGE__->meta->make_immutable(inline_constructor => 0);
381;
39