| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
# Copyright 2023-2026, Paul Johnson ([email protected]) |
| 4 |
|
| 5 |
# This software is free. It is licensed under the same terms as Perl itself. |
| 6 |
|
| 7 |
# The latest version of this software should be available from my homepage: |
| 8 |
# https://pjcj.net |
| 9 |
|
| 10 |
sub usub { |
| 11 |
# uncoverable subroutine class:ignore_covered_err |
| 12 |
# uncoverable statement class:ignore_covered_err |
| 13 |
my $x = 1; |
| 14 |
} |
| 15 |
|
| 16 |
sub main { |
| 17 |
my $x = 1; |
| 18 |
# uncoverable branch false class:ignore_covered_err |
| 19 |
# uncoverable branch true |
| 20 |
if ($x > 1) { |
| 21 |
$x = 0; |
| 22 |
# uncoverable statement class:ignore_covered_err |
| 23 |
$x = 2; |
| 24 |
if ($x > 3) { |
| 25 |
$x = 4; |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
my $y = 0; |
| 30 |
# uncoverable branch true |
| 31 |
# uncoverable condition left |
| 32 |
# uncoverable condition right class:ignore_covered_err |
| 33 |
# uncoverable condition false |
| 34 |
if ($x > 0 && $y > 0) { |
| 35 |
# uncoverable statement |
| 36 |
$y = 1; |
| 37 |
} |
| 38 |
|
| 39 |
while ($y < 4) { |
| 40 |
# uncoverable branch false |
| 41 |
# uncoverable condition left |
| 42 |
# uncoverable condition right |
| 43 |
if ($x > 0 && $y > 0) { |
| 44 |
$y = 4; |
| 45 |
} else { |
| 46 |
$y++; |
| 47 |
} |
| 48 |
} |
| 49 |
|
| 50 |
# uncoverable statement class:ignore_covered_err |
| 51 |
$x = 3; |
| 52 |
usub; |
| 53 |
} |
| 54 |
|
| 55 |
main |