Branch Coverage

blib/lib/Farly/Rule/Optimizer.pm
Criterion Covered Total %
branch 41 70 58.5


line true false branch
16 0 5 unless defined $rules
19 0 5 unless $rules->isa('Farly::Object::List')
69 0 83 if ($rule->has_defined('REMOVE'))
72 2 81 unless ($rule->matches($search))
82 0 557 if ($rule->get($key)->isa('Farly::Object::Ref'))
96 0 0 unless defined $action and length $action
104 0 0 unless defined $action and length $action
125 5 5 unless $a->get('DST_IP')->compare($b->get('DST_IP')) or $a->get('SRC_IP')->compare($b->get('SRC_IP')) or $a->get('DST_PORT')->compare($b->get('DST_PORT')) or $a->get('SRC_PORT')->compare($b->get('SRC_PORT'))
144 3 4 unless $a->get('DST_IP')->compare($b->get('DST_IP')) or $a->get('SRC_IP')->compare($b->get('SRC_IP')) or $a->get('ICMP_TYPE')->compare($b->get('ICMP_TYPE'))
170 5 15 if $rule->matches($ICMP)
171 8 7 if $rule->matches($TCP)
172 3 4 if $rule->matches($UDP)
174 2 2 if ($rule->has_defined('PROTOCOL')) { }
190 1 0 unless $a->get('DST_IP')->compare($b->get('DST_IP')) or $a->get('SRC_IP')->compare($b->get('SRC_IP'))
235 79 0 if ($rule->has_defined($property)) { }
266 0 21 if $rule_x->has_defined('REMOVE')
275 0 0 if $rule_y->has_defined('REMOVE')
280 0 0 if ($rule_x->get('LINE')->number <= $rule_y->get('LINE')->number)
286 0 0 if ($rule_y->contained_by($rule_x1))
313 0 0 if (not $rule_z->get('DST_IP')->gt($rule_x1->get('DST_IP'))) { }
316 0 0 if ($rule_z->get('LINE')->number >= $rule_x->get('LINE')->number and $rule_z->get('LINE')->number <= $rule_y->get('LINE')->number)
321 0 0 if ($rule_z->intersects($rule_x1))
324 0 0 unless ($rule_z->contained_by($rule_x1))
360 5 16 if $rule_x->has_defined('REMOVE')
370 0 54 if $rule_y->has_defined('REMOVE')
372 46 8 if (not $rule_y->get('DST_IP')->gt($rule_x->get('DST_IP'))) { }
377 5 41 if ($rule_y->contained_by($rule_x1))
380 4 1 if ($rule_x->get('LINE')->number <= $rule_y->get('LINE')->number) { }
388 1 0 if ($self->_can_remove($rule_y, $rule_x, $s_an))
411 5 55 if ($rule->has_defined('REMOVE'))
425 92 10 unless ($rule->has_defined('REMOVE'))
436 0 5 if ($self->_is_verbose)
450 3 6 if ($self->_mode eq 'L4') { }
3 3 elsif ($self->_mode eq 'L3') { }
3 0 elsif ($self->_mode eq 'ICMP') { }