Branch Coverage

lib/UR/BoolExpr.pm
Criterion Covered Total %
branch 185 276 67.0


line true false branch
62 0 13 if exists $self->{'flatten'}
65 9 4 if $self == $flat
72 0 20 if $self->{'reframe'}{$in_terms_of}
75 0 20 if $self == $reframe
116 0 247 unless ref $other_rule and $self->isa(ref $other_rule)
121 0 247 unless ($my_template->isa('UR::BoolExpr::Template::And') and $other_template->isa('UR::BoolExpr::Template::And'))
125 21 226 unless $my_template->is_subset_of($other_template)
136 0 292 if ref $my_value or ref $other_value
139 32 260 if $my_value ne $other_value
147 354875 501413 if ($self->{'values'})
151 0 501413 unless defined $value_id and length $value_id
154 64 501349 if (my $hard_refs = $self->{'hard_refs'})
167 2 279934 unless defined $position
185 1745 481 if (exists $h->{$property_name}) { }
189 47 1698 if (exists $self->{'hard_refs'}{$tmpl_pos}) { }
209 1489 elsif ($self->_value_is_old_style_operator_and_value($v)) { }
197 229 252 if $property_name eq 'id'
204 96 354 if ($id_property_names[$i] eq $property_name)
226 1 51 unless (exists $self->{'_underlying_rules'})
261 571 374 if ($key =~ /^$property_name\b/)
282 634825 108890 unless (exists $UR::Object::rules->{$rule_id})
301 343913 179 unless $self->{'hard_refs'}
309 8 129 if (ref $value and &Scalar::Util::blessed($value) and $value->isa('UR::Object'))
316 0 8 unless (@possible_data_types)
322 0 8 unless ($data_type)
332 0 8 unless ($value2)
336 1 7 unless ($value2 eq $value)
342 0 7 if $op
348 7 171 if ($changes) { }
359 0 63633 unless defined wantarray
360 968 62665 if wantarray
361 0 62665 if (@extra)
401 0 190580 if $resolve_depth > 10
404 5992 6196 if (@_ == 3 and ref $_[2] and ref($_[2])->isa('UR::BoolExpr'))
411 0 184588 unless $subject_class
415 1 184587 if ($subject_class->isa('UR::Value::PerlReference') and $subject_class eq 'UR::Value::' . ref($_[0])) { }
2 184585 elsif (ref $_[0] eq 'HASH') { }
425 31 184557 if (defined $in_params[0] and $in_params[0] eq '-or')
431 3 0 if ($in_params[$i] =~ /^-/)
446 6194 178363 if (@in_params == 1) { }
0 178363 elsif (@in_params % 2 == 1) { }
461 0 217869 unless (defined $key)
465 650 217219 if (UR::BoolExpr::Util::is_meta_param($key))
472 93 217126 if ($key =~ /^(_id_only|_param_key|_unique|__get_serial|_change_count)$/)
478 790 216336 if ($pos != -1) { }
482 0 790 if (substr($operator, 0, 1) eq ' ')
492 11080 206046 if (my $ref = ref $value)
493 1154 9926 if (not $operator and $ref eq 'HASH')
494 871 283 if ($class->_value_is_old_style_operator_and_value($value)) { }
499 863 8 defined $value->{'operator'} ? :
500 0 871 if (exists $value->{'escape'})
513 1805 9275 if ($ref eq 'ARRAY')
514 1397 408 if (not $operator) { }
0 408 elsif ($operator eq 'not') { }
526 54 2670 if (ref $val)
554 0 184557 if ($exception)
557 0 184557 unless ($subject_class_meta)
571 149 217126 if (UR::BoolExpr::Util::is_meta_param($key)) { }
580 3054 214072 if ($pos != -1) { }
584 4 3050 if (substr($operator, 0, 1) eq ' ')
598 230 216896 unless (exists $subject_class_props->{$base_property_name})
599 0 230 if (substr($property_name, 0, 1) eq '_') { }
610 10404 206492 if ($ref)
612 1558 8846 if ($ref eq 'ARRAY' and $operator ne 'between' and $operator ne 'not between') { }
8289 557 elsif (&blessed($value)) { }
274 283 elsif ($ref ne 'HASH') { }
615 1558 0 if ($UR::initialized) { }
617 0 1558 unless (defined $property_meta)
626 0 0 if (exists $subject_class_meta->{'has'}{$property_name})
633 219 1339 if ($data_type eq 'ARRAY') { }
955 384 elsif (not $is_many) { }
648 0 831 unless (defined $a)
649 1 830 unless (defined $b)
656 19 1461 if ($last eq $value->[$i]) { }
674 0 8289 unless ($property_meta)
678 0 0 if $property_meta
680 0 0 unless ($property_meta)
685 8173 116 if ($property_meta->id_by or $property_meta->reverse_as) { }
84 32 elsif ($property_meta->is_valid_storage_for_value($value)) { }
32 0 elsif ($value->can($property_name)) { }
687 0 8173 unless ($property_meta)
700 11 8162 if (my $id_class_by = $property_meta->id_class_by)
716 0 0 unless $operator
733 89 184467 if (@swap_key_pos)
737 184 184372 if (@extra_key_pos)
745 4518 180038 if (@xremove_keys)
751 8403 21420 if ($xremove_key_idx < @xremove_keys and $read_key_idx == $xremove_keys[$xremove_key_idx])
763 4518 180038 if (@xremove_values)
764 5 4513 if (@hard_refs)
769 5 0 if ($rem_pos < $ref_pos) { }
0 0 elsif ($rem_pos == $ref_pos) { }
787 8403 21412 if ($xremove_value_idx < @xremove_values and $read_value_idx == $xremove_values[$xremove_value_idx])
800 589 183967 if (@constant_values) { }
830 650 228422 if (UR::BoolExpr::Util::is_meta_param($key)) { }
839 570 183985 if (@hard_refs)
845 178404 6151 if (wantarray) { }
1 6150 elsif (@extra and defined wantarray) { }
849 2 0 defined $_ ? :
860 64 15 unless $self->{'values'}
864 54 25 if ($template_class eq 'UR::BoolExpr::Template::And') { }
25 0 elsif ($template_class eq 'UR::BoolExpr::Template::Or') { }
0 0 elsif ($template_class->isa('UR::BoolExpr::PropertyComparison')) { }
870 18 105 if (UR::BoolExpr::Util::is_meta_param($key)) { }
900 179096 338681 if ($rule_template->{'is_normalized'})
906 0 338681 unless defined $normalized
908 64 338617 if (my $special = $self->{'hard_refs'})
920 2717 58422 if $params_array
927 3357 55065 if (exists $params->{'_param_key'})
942 4 121 unless ($LOADED_BXPARSE)
948 0 4 if ($exception)
957 0 114 unless ($tree)
961 6 108 if $usage_hints_string
962 1 113 if $order_string
963 0 114 if $page_string
966 6 108 if (wantarray) { }
971 0 114 unless ($bx)
976 0 114 if ($$remaining_strref)
979 6 108 if (wantarray) { }
1008 0 0 if ($fdata->[1] =~ /^!?(:|@|between|in)$/i) { }
0 0 elsif (length $fdata->[2] == 0) { }
1013 0 0 if ($fdata->[1] eq '@') { }
1016 0 0 unless ($fh)
1028 0 0 if (@list_parts > 1) { }
0 0 elsif (@range_parts >= 2) { }
1029 0 0 $fdata->[1] =~ /^!/ ? :
1031 0 0 if (substr($key, -3, 3) ne ' in')
1038 0 0 if (@range_parts > 2) { }
0 0 elsif (@range_parts == 2) { }
1039 0 0 if (@range_parts % 2) { }
1066 0 0 if ($fdata->[1] eq '=') { }
1086 0 0 if ($usage_hints or $order or $page) { }
1092 0 0 $usage_hints ? :
0 0 $order ? :
0 0 $page ? :
1115 0 0 unless $params{'values'}
1116 0 0 unless $params{'constant_values'}
1117 0 0 unless $params{'keys'}
1118 0 0 if %params