Condition Coverage

blib/lib/WWW/Shopify/Liquid/Parser.pm
Criterion Covered Total %
condition 48 66 72.7


and 3 conditions

line !l l&&!r l&&r condition
120 52 91 0 int @tokens > 0 and $tokens[0]{'core'} ne ':'
126 134 0 43 $_->isa('WWW::Shopify::Liquid::Token::Separator') and $_->{'core'} eq ','
174 2075 0 651 $_->isa('WWW::Shopify::Liquid::Token::Operator') and defined $_->{'core'}
2075 0 651 $_->isa('WWW::Shopify::Liquid::Token::Operator') and defined $_->{'core'} and $self->operator($_->{'core'})
216 0 120 144 $_->[0]{'core'} and $_->[0]{'core'} eq '|'
532 0 144 $_->isa('WWW::Shopify::Liquid::Token::Operator') and $_->{'core'} eq '|'
228 0 0 502 $idx > 0 and $idx < $#tokens
0 0 502 $idx > 0 and $idx < $#tokens and $op1->isa('WWW::Shopify::Liquid::Operator') || $op1->isa('WWW::Shopify::Liquid::Token::Operand') || $op1->isa('WWW::Shopify::Liquid::Filter')
0 173 329 $idx > 0 and $idx < $#tokens and $op1->isa('WWW::Shopify::Liquid::Operator') || $op1->isa('WWW::Shopify::Liquid::Token::Operand') || $op1->isa('WWW::Shopify::Liquid::Filter') and $op2->isa('WWW::Shopify::Liquid::Operator') || $op2->isa('WWW::Shopify::Liquid::Token::Operand') || $op2->isa('WWW::Shopify::Liquid::Filter')
267 651 14 82 exists $allowed_internal_tags{$tokens[$_]->tag} and $level == 1
310 42 313 $tokens[$_]->tag eq 'end' . $token->tag and $level == 1
277 372 0 23 $self->enclosing_tags->{$token->tag}->inner_ignore_whitespace and int @contents > 0
372 21 2 $self->enclosing_tags->{$token->tag}->inner_ignore_whitespace and int @contents > 0 and int @{$contents[0];} > 0
21 0 2 $self->enclosing_tags->{$token->tag}->inner_ignore_whitespace and int @contents > 0 and int @{$contents[0];} > 0 and $contents[0][0]->isa('WWW::Shopify::Liquid::Token::Text::Whitespace')
280 28 268 211 int @array > 0 and $array[0]->isa('WWW::Shopify::Liquid::Token::Tag')
296 99 112 int @array > 0 and $array[0]->isa('WWW::Shopify::Liquid::Token::Tag') and $allowed_internal_tags{$array[0]->tag}
308 6 0 0 $token->tag =~ /^end(\w+)$/ and $self->enclosing_tags->{$1}
386 0 1 0 $ast->{'false_path'} and $ast->{'false_path'}->isa('WWW::Shopify::Liquid::Tag::If')

or 3 conditions

line l !l&&r !l&&!r condition
228 500 2 0 $op1->isa('WWW::Shopify::Liquid::Operator') || $op1->isa('WWW::Shopify::Liquid::Token::Operand') || $op1->isa('WWW::Shopify::Liquid::Filter')
466 35 1 $op2->isa('WWW::Shopify::Liquid::Operator') || $op2->isa('WWW::Shopify::Liquid::Token::Operand') || $op2->isa('WWW::Shopify::Liquid::Filter')
240 1142 5 1 int grep({not $_->isa('WWW::Shopify::Liquid::Token::Variable::Named');} @tokens) == 1 or int grep({not $_->isa('WWW::Shopify::Liquid::Token::Variable::Named');} @tokens) == 0
373 26 33 159 $self->is_processed($ast) or $ast->isa('WWW::Shopify::Liquid::Token')