Branch Coverage: lib/OpenMP/Environment/Validation.pm

# Branch Coverage

File: | lib/OpenMP/Environment/Validation.pm
Coverage: | 99.5%

line | % | coverage | branch
--- | --- | --- | ---
65 | 100 | T | F | unless defined $name
66 | 100 | T | F | unless OpenMP::Environment::Constants::is_environment_name($name)
68 | 100 | T | F | unless defined $value
78 | 100 | T | F | if ($name =~ /\AOMP_/ and $name ne "OMP_AFFINITY_FORMAT")
81 | 100 | T | F | if $UPPERCASE_FILTER{$name}
84 | 100 | T | F | if defined $error
90 | 100 | T | F | unless defined $name
91 | 100 | T | F | unless OpenMP::Environment::Constants::is_environment_name($name)
93 | 100 | T | F | unless defined $value
99 | 100 | T | F | unless $LEGACY_VALIDATED{$name}
105 | 100 | T | F | if ref $env ne "HASH"
106 | 100 | T | F | unless OpenMP::Environment::Constants::is_environment_name($name)
109 | 100 | T | F | if (exists $env->{$name})
110 | 100 | T | F | if (defined $env->{$name})
117 | 100 | T | F | unless grep {$_ eq $name;} @{$$conflict{"variables"};}
125 | 100 | T | F | if ref $env ne "HASH"
128 | 100 | T | F | unless exists $env->{$name}
129 | 100 | T | F | unless defined $env->{$name}
134 | 100 | T | F | if (@{$analysis->{'conflicts'};})
143 | 100 | T | F | if ref $env ne "HASH"
147 | 100 | T | F | unless exists $env->{$name}
148 | 100 | T | F | unless defined $env->{$name}
150 | 100 | T | F | unless $ok
154 | 100 | T | F | if (_is_false($env->{'OMP_NESTED'}))
155 | 100 | T | F | if (defined $env->{'OMP_MAX_ACTIVE_LEVELS'})
156 | 100 | T | F | if ($env->{'OMP_MAX_ACTIVE_LEVELS'} =~ /\A\d+\z/)
157 | 100 | T | F | if ($env->{'OMP_MAX_ACTIVE_LEVELS'} > 1)
180 | 100 | T | F | if (exists $env->{'GOMP_CPU_AFFINITY'})
181 | 100 | T | F | if (exists $env->{'OMP_PROC_BIND'})
185 | 100 | T | F | if (exists $env->{'OMP_NESTED'})
186 | 100 | T | F | if (exists $env->{'OMP_MAX_ACTIVE_LEVELS'})
188 | 100 | T | F | if (_is_false($env->{'OMP_NESTED'}))
189 | 100 | T | F | if ($env->{'OMP_MAX_ACTIVE_LEVELS'} =~ /\A\d+\z/)
190 | 100 | T | F | if $env->{'OMP_MAX_ACTIVE_LEVELS'} > 1
193 | 100 | T | F | unless $conflicting
197 | 100 | T | F | if (_has_multiple_items($env->{'OMP_NUM_THREADS'})) { }
| 100 | T | F | elsif (_has_proc_bind_list($env->{'OMP_PROC_BIND'})) { }
205 | 100 | T | F | if @errors
206 | 100 | T | F | if @conflicts
218 | 100 | T | F | unless exists $env->{$name}
225 | 100 | T | F | unless defined $value
226 | 100 | T | F | if $value =~ /\A(?:0|false)\z/i
232 | 100 | T | F | unless defined $value
233 | 100 | T | F | if $value =~ /,/
239 | 100 | T | F | unless defined $value
240 | 100 | T | F | if $value =~ /,/
247 | 100 | T | F | if $allowed{uc $value}
253 | 100 | T | F | unless $value =~ /\A\d+\z/
254 | 100 | T | F | if $value < $minimum
260 | 100 | T | F | if $value =~ /\A\s*[1-9]\d*(?:\s*,\s*[1-9]\d*)*\s*\z/
333 | 100 | T | F | if $value =~ /\A\s*(?:TRUE|FALSE)\s*\z/i
334 | 100 | T | F | if $value =~ /\A\s*(?:PRIMARY|MASTER|CLOSE|SPREAD)(?:\s*,\s*(?:PRIMARY|MASTER|CLOSE|SPREAD))*\s*\z/i
349 | 100 | T | F | if $text eq ""
350 | 100 | T | F | if $text =~ /\A[A-Za-z_][A-Za-z0-9_]*(?:\(\s*[1-9]\d*\s*\))?\z/
353 | 100 | T | F | unless @items
356 | 100 | T | F | if defined $err
368 | 100 | T | F | if $value =~ /\A\s*[1-9]\d*\s*(?:[BKMG])?\s*\z/i
382 | 100 | T | F | if $value =~ /\A\s*(?:(?:MONOTONIC|NONMONOTONIC)\s*:\s*)?(?:STATIC|DYNAMIC|GUIDED|AUTO)(?:\s*,\s*[1-9]\d*)?\s*\z/i
414 | 100 | T | F | if $value =~ /\A\s*$entry(?:\s*(?:,|\s)\s*$entry)*\s*\z/
434 | 100 | T | F | if $value =~ /\A\s*[1-9]\d*\s*(?:[BKMG])?\s*\z/i
445 | 100 | T | F | if $value =~ /\A\s*(?:INFINITE|INFINITY)\s*\z/i
446 | 100 | T | F | if $value =~ /\A\s*\d+(?:k|M|G|T)?\s*\z/
458 | 100 | T | F | if $value =~ /\A\s*$config(?:\s*:\s*$config)*\s*\z/
494 | 100 | T | F | if $allocator{$text}
495 | 100 | T | F | if $space{$text}
498 | 100 | T | F | unless defined $memspace
501 | 100 | T | F | unless $space{$memspace}
502 | 100 | T | F | unless length _trim($traits)
508 | 100 | T | F | unless defined $name
510 | 100 | T | F | if $seen{$name}++
512 | 100 | T | F | if defined $err
516 | 100 | T | F | if (defined $parsed{'fb_data'})
538 | 100 | T | F | if $pos < 0
539 | 100 | T | F | if $pos == length($value) - 1
541 | 100 | T | F | if (substr($value, $i, 1) eq "%")
547 | 100 | T | F | if ($tail =~ /\A$width([A-Za-z])/)
551 | 100 | T | F | if ($tail =~ /\A$width\{[A-Za-z_][A-Za-z0-9_]*\}/)
569 | 100 | T | F | if ($name eq "sync_hint")
572 | 100 | T | F | if ($name eq "alignment")
573 | 100 | T | F | unless $value =~ /\A[1-9]\d*\z/
575 | 100 | T | F | if ($value & $value - 1) != 0
579 | 100 | T | F | if ($name eq "access")
582 | 100 | T | F | if ($name eq "pool_size")
585 | 100 | T | F | if ($name eq "fallback")
588 | 100 | T | F | if ($name eq "fb_data")
589 | 100 | T | F | if $$allocators{lc $value}
592 | 100 | T | F | if ($name eq "pinned")
595 | 100 | T | F | if ($name eq "partition")
614 | 100 | T | F | if $char eq "{"
615 | 100 | T | F | if $char eq "}"
616 | 100 | T | F | if $char eq "("
617 | 100 | T | F | if $char eq ")"
618 | 100 | T | F | if $brace < 0
619 | 100 | T | F | if $paren < 0
620 | 100 | T | F | if ($char eq $separator)
621 | 100 | T | F | unless ($brace)
622 | 100 | T | F | unless ($paren)
631 | 100 | T | F | if $brace
632 | 100 | T | F | if $paren
634 | 100 | T | F | if grep {$_ eq "";} @parts
644 | 100 | T | F | if (substr($text, 0, 1) eq '{') { }
| 100 | T | F | elsif ($text =~ /\A(\d+)(.*)\z/s) { }
646 | 100 | T | F | if $close < 0
651 | 100 | T | F | unless @resources
654 | 100 | T | F | if defined $err
665 | 100 | T | F | if _trim($suffix) eq ""
666 | 100 | T | F | unless $suffix =~ /\A\s*:\s*[1-9]\d*(?:\s*:\s*[+-]?\d+)?\s*\z/
675 | 100 | T | F | if $text =~ /\A\d+(?:\s*:\s*[1-9]\d*(?:\s*:\s*[+-]?\d+)?)?\z/
684 | 100 | T | F | if $char eq "{"
685 | 100 | T | F | if ($char eq "}")
687 | 50 | T | F | if $depth == 0